MapElementGroup { @Pure public static ShapeElementType classifiesElement(MapElement element) { final Class<? extends MapElement> type = element.getClass(); if (MapMultiPoint.class.isAssignableFrom(type)) { return ShapeElementType.MULTIPOINT; } if (MapPolygon.class.isAssignableFrom(type)) { return ShapeElementType.POLYGON; } if (MapPolyline.class.isAssignableFrom(type)) { return ShapeElementType.POLYLINE; } if (MapPoint.class.isAssignableFrom(type)) { return ShapeElementType.POINT; } return ShapeElementType.UNSUPPORTED; } MapElementGroup(); @Pure static ShapeElementType classifiesElement(MapElement element); @Pure static Map<ShapeElementType, MapElementGroup> classifiesElements(Collection<? extends MapElement> elements); @Pure static Map<ShapeElementType, MapElementGroup> classifiesElements(Iterator<? extends MapElement> elements); static void classifiesElements(Map<ShapeElementType, MapElementGroup> classification,
			Collection<? extends MapElement> elements); static void classifiesElements(Map<ShapeElementType, MapElementGroup> classification,
			Iterator<? extends MapElement> elements); @Pure ESRIBounds getBounds(); @SuppressWarnings("checkstyle:visibilitymodifier")
	final Collection<MapElement> elements; }
@Test public void classifiesElementMapElement() { assertEquals(ShapeElementType.POINT, MapElementGroup.classifiesElement(new MapPoint(0, 0))); assertEquals(ShapeElementType.MULTIPOINT, MapElementGroup.classifiesElement(new MapMultiPoint())); assertEquals(ShapeElementType.POLYLINE, MapElementGroup.classifiesElement(new MapPolyline())); assertEquals(ShapeElementType.POLYGON, MapElementGroup.classifiesElement(new MapPolygon())); assertEquals(ShapeElementType.UNSUPPORTED, MapElementGroup.classifiesElement(new MapCircle(0, 0))); }