try {
long id = Long.parseLong(s);
if (id <= 0) {
return false;
} else if (type == OsmPrimitiveType.NODE) {
ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.NODE));
} else if (type == OsmPrimitiveType.WAY || type == OsmPrimitiveType.CLOSEDWAY) {
ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.WAY));
} else if (type == OsmPrimitiveType.RELATION || type == OsmPrimitiveType.MULTIPOLYGON) {
ids.add(new SimplePrimitiveId(id, OsmPrimitiveType.RELATION));
} else {
return false;
}
} catch (IllegalArgumentException ex2) {
return false;