gnu.trove.list.TIntList.isEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中gnu.trove.list.TIntList.isEmpty()方法的一些代码示例,展示了TIntList.isEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TIntList.isEmpty()方法的具体详情如下:
包路径:gnu.trove.list.TIntList
类名称:TIntList
方法名:isEmpty

TIntList.isEmpty介绍

[英]Tests whether this list contains any values.
[中]测试此列表是否包含任何值。

代码示例

代码示例来源:origin: MovingBlocks/Terasology

public int get(String forUseBy) {
  if (pool.isEmpty()) {
    IntBuffer buffer = BufferUtils.createIntBuffer(BUFFER_FETCH_SIZE);
    GL15.glGenBuffers(buffer);
    for (int i = 0; i < BUFFER_FETCH_SIZE; ++i) {
      pool.add(buffer.get(i));
    }
    totalPoolSize += BUFFER_FETCH_SIZE;
  }
  int result = pool.removeAt(pool.size() - 1);
  if (traceBufferUsage) {
    usageTracker.put(result, forUseBy);
  }
  return result;
}

代码示例来源:origin: opentripplanner/OpenTripPlanner

if (skippedStops.isEmpty()) {
  LOG.warn("No stops found to skip on matched trip pattern {}", original);
  return Arrays.asList(original);

代码示例来源:origin: opentripplanner/OpenTripPlanner

if (!removedStopSequences.isEmpty()) {
  LOG.warn(graph.addBuilderAnnotation(new RepeatedStops(trip, removedStopSequences)));

代码示例来源:origin: opentripplanner/OpenTripPlanner

if (!transfers.isEmpty())
  transfersForStop.add(transfers.toArray());
else

代码示例来源:origin: com.graphhopper/graphhopper

/**
 * Returns the list of all edges.
 */
public List<EdgeIteratorState> calcEdges()
{
  final List<EdgeIteratorState> edges = new ArrayList<EdgeIteratorState>(edgeIds.size());
  if (edgeIds.isEmpty())
    return edges;
  forEveryEdge(new EdgeVisitor()
  {
    @Override
    public void next( EdgeIteratorState eb, int i )
    {
      edges.add(eb);
    }
  });
  return edges;
}

代码示例来源:origin: conveyal/r5

if (newDistanceTable.isEmpty()) return null; // not near any points in sub pointset
  else return newDistanceTable.toArray();
})

代码示例来源:origin: com.conveyal/r5

if (newDistanceTable.isEmpty()) return null; // not near any points in sub pointset
  else return newDistanceTable.toArray();
})

代码示例来源:origin: com.conveyal/gtfs-lib

Fun.Tuple2<String, String> routeKey = entry.getKey();
TIntList waitTimes = entry.getValue();
if (waitTimes.isEmpty()) {
  continue;

代码示例来源:origin: com.conveyal/r5

if (modified && bin.isEmpty()) {
  bins.remove(mapKey);
  nBins--;

代码示例来源:origin: conveyal/r5

if (modified && bin.isEmpty()) {
  bins.remove(mapKey);
  nBins--;

代码示例来源:origin: voxelwind/voxelwind

public static List<IntRange> intoRanges(TIntList ids) {
  if (ids.isEmpty()) {
    throw new NoSuchElementException();
  }
  List<IntRange> ranges = new ArrayList<>();
  if (ids.size() == 1) {
    return ImmutableList.of(new IntRange(ids.get(0)));
  }
  ids.sort();
  int start = ids.get(0);
  int cur = start;
  for (int id : ids.subList(1, ids.size()).toArray()) {
    if (cur + 1 == id) {
      cur = id;
    } else {
      ranges.add(new IntRange(start, cur));
      start = id;
      cur = id;
    }
  }
  if (start == cur) {
    ranges.add(new IntRange(start));
  } else {
    ranges.add(new IntRange(start, cur));
  }
  return ranges;
}

代码示例来源:origin: com.conveyal/gtfs-lib

if (deltas.isEmpty()) return -1;

代码示例来源:origin: com.graphhopper/graphhopper

/**
 * @return the uncached node indices of the tower nodes in this path.
 */
public TIntList calcNodes()
{
  final TIntArrayList nodes = new TIntArrayList(edgeIds.size() + 1);
  if (edgeIds.isEmpty())
  {
    if (isFound())
    {
      nodes.add(endNode);
    }
    return nodes;
  }
  int tmpNode = getFromNode();
  nodes.add(tmpNode);
  forEveryEdge(new EdgeVisitor()
  {
    @Override
    public void next( EdgeIteratorState eb, int i )
    {
      nodes.add(eb.getAdjNode());
    }
  });
  return nodes;
}

代码示例来源:origin: com.flowpowered/caustic-api

final boolean hasTextureCoords;
final boolean hasNormals;
if (!textureCoordIndices.isEmpty() && !rawTextureCoords.isEmpty()) {
  textureCoords.fill(0, positions.size() / positionSize * textureCoordSize, 0);
  hasTextureCoords = true;
  hasTextureCoords = false;
if (!normalIndices.isEmpty() && !rawNormalComponents.isEmpty()) {
  normals.fill(0, positions.size() / positionSize * normalSize, 0);
  hasNormals = true;

代码示例来源:origin: com.graphhopper/graphhopper

if (edgeIds.isEmpty())

代码示例来源:origin: com.graphhopper/graphhopper

if (edgeIds.isEmpty())

相关文章