public static void forAllPrimitives(final GeoItem item, final Action1<GeoPrimitive> action) {
        if (item instanceof GeoPrimitive) {
            action.call((GeoPrimitive) item);
        } else if (item instanceof GeoGroup) {
            for (GeoItem child : ((GeoGroup) item).getItems()) {
                forAllPrimitives(child, action);
            }
        }
    }
Represents a group of drawable GeoItem such as a point, polyline, polygon or enclosed groups
main/src/main/java/cgeo/geocaching/models/geoitem/GeoGroup.java