MapElementGroup { @Pure public static Map<ShapeElementType, MapElementGroup> classifiesElements(Collection<? extends MapElement> elements) { return classifiesElements(elements.iterator()); } 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 classifiesElementsMapIterator() { Map<ShapeElementType, MapElementGroup> map = new TreeMap<>(); MapElementGroup.classifiesElements(map, Arrays.asList(this.point, this.multiPoint, this.polyline, this.polygon, this.circle).iterator()); assertSame(this.point, map.get(ShapeElementType.POINT).elements.iterator().next()); assertSame(this.multiPoint, map.get(ShapeElementType.MULTIPOINT).elements.iterator().next()); assertSame(this.polyline, map.get(ShapeElementType.POLYLINE).elements.iterator().next()); assertSame(this.polygon, map.get(ShapeElementType.POLYGON).elements.iterator().next()); }
@Test public void classifiesElementsCollection() { Map<ShapeElementType, MapElementGroup> map = new TreeMap<>(); MapElementGroup.classifiesElements(map, Arrays.asList(this.point, this.multiPoint, this.polyline, this.polygon, this.circle)); assertSame(this.point, map.get(ShapeElementType.POINT).elements.iterator().next()); assertSame(this.multiPoint, map.get(ShapeElementType.MULTIPOINT).elements.iterator().next()); assertSame(this.polyline, map.get(ShapeElementType.POLYLINE).elements.iterator().next()); assertSame(this.polygon, map.get(ShapeElementType.POLYGON).elements.iterator().next()); }
@Test public void classifiesElementsIterator() { Map<ShapeElementType, MapElementGroup> map = MapElementGroup.classifiesElements( Arrays.asList(this.point, this.multiPoint, this.polyline, this.polygon, this.circle).iterator()); assertSame(this.point, map.get(ShapeElementType.POINT).elements.iterator().next()); assertSame(this.multiPoint, map.get(ShapeElementType.MULTIPOINT).elements.iterator().next()); assertSame(this.polyline, map.get(ShapeElementType.POLYLINE).elements.iterator().next()); assertSame(this.polygon, map.get(ShapeElementType.POLYGON).elements.iterator().next()); }
@Test public void classifiesElementsMapCollection() { Map<ShapeElementType, MapElementGroup> map = MapElementGroup.classifiesElements( Arrays.asList(this.point, this.multiPoint, this.polyline, this.polygon, this.circle)); assertSame(this.point, map.get(ShapeElementType.POINT).elements.iterator().next()); assertSame(this.multiPoint, map.get(ShapeElementType.MULTIPOINT).elements.iterator().next()); assertSame(this.polyline, map.get(ShapeElementType.POLYLINE).elements.iterator().next()); assertSame(this.polygon, map.get(ShapeElementType.POLYGON).elements.iterator().next()); }