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