/** Process objects with specific tag. */ public void byTag( String tagName, Predicate<IOsmObject> predicate, Consumer<IOsmObject> consumer) { short tagKey = tagsPack.getTagCode(tagName); for (int i = 0; i < nodes.size(); i++) { IOsmNode n = nodes.get(i); if (n.hasTag(tagKey)) { if (predicate.test(n)) { consumer.accept(n); } } } for (int i = 0; i < ways.size(); i++) { IOsmWay w = ways.get(i); if (w.hasTag(tagKey)) { if (predicate.test(w)) { consumer.accept(w); } } } for (int i = 0; i < relations.size(); i++) { IOsmRelation r = relations.get(i); if (r.hasTag(tagKey)) { if (predicate.test(r)) { consumer.accept(r); } } } }