use of com.slimjars.dist.gnu.trove.iterator.TLongIterator in project osm4j-core by topobyte.
the class EntityFinderLogMissing method findNodes.
@Override
public List<OsmNode> findNodes(TLongCollection ids) throws EntityNotFoundException {
List<OsmNode> nodes = new ArrayList<>();
TLongIterator idIterator = ids.iterator();
while (idIterator.hasNext()) {
long id = idIterator.next();
try {
nodes.add(entityProvider.getNode(id));
} catch (EntityNotFoundException e) {
logNodeNotFound(id);
}
}
return nodes;
}
use of com.slimjars.dist.gnu.trove.iterator.TLongIterator in project osm4j-core by topobyte.
the class EntityFinderLogMissing method findRelations.
@Override
public List<OsmRelation> findRelations(TLongCollection ids) {
List<OsmRelation> relations = new ArrayList<>();
TLongIterator idIterator = ids.iterator();
while (idIterator.hasNext()) {
long id = idIterator.next();
try {
relations.add(entityProvider.getRelation(id));
} catch (EntityNotFoundException e) {
logRelationNotFound(id);
}
}
return relations;
}
use of com.slimjars.dist.gnu.trove.iterator.TLongIterator in project osm4j-core by topobyte.
the class EntityFinderThrowMissing method findRelations.
@Override
public List<OsmRelation> findRelations(TLongCollection ids) throws EntityNotFoundException {
List<OsmRelation> relations = new ArrayList<>();
TLongIterator idIterator = ids.iterator();
while (idIterator.hasNext()) {
relations.add(entityProvider.getRelation(idIterator.next()));
}
return relations;
}
use of com.slimjars.dist.gnu.trove.iterator.TLongIterator in project osm4j-core by topobyte.
the class EntityFinderThrowMissing method findWays.
@Override
public List<OsmWay> findWays(TLongCollection ids) throws EntityNotFoundException {
List<OsmWay> ways = new ArrayList<>();
TLongIterator idIterator = ids.iterator();
while (idIterator.hasNext()) {
ways.add(entityProvider.getWay(idIterator.next()));
}
return ways;
}
use of com.slimjars.dist.gnu.trove.iterator.TLongIterator in project osm4j-core by topobyte.
the class IdUtil method lowestId.
public static long lowestId(TLongCollection ids) {
long lowest = Long.MAX_VALUE;
TLongIterator iterator = ids.iterator();
while (iterator.hasNext()) {
lowest = Math.min(lowest, iterator.next());
}
return lowest;
}
Aggregations