MapElementGroup { void add(MapElement element) { final Rectangle2d r = element.getBoundingBox(); if (r != null) { if (Double.isNaN(this.minx) || this.minx > r.getMinX()) { this.minx = r.getMinX(); } if (Double.isNaN(this.maxx) || this.maxx < r.getMaxX()) { this.maxx = r.getMaxX(); } if (Double.isNaN(this.miny) || this.miny > r.getMinY()) { this.miny = r.getMinY(); } if (Double.isNaN(this.maxy) || this.maxy < r.getMaxY()) { this.maxy = r.getMaxY(); } } this.elements.add(element); } 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 addMapElement() { this.group.add(this.point); this.group.add(this.multiPoint); this.group.add(this.polyline); this.group.add(this.polygon); this.group.add(this.circle); Iterator<? extends MapElement> iterator = this.group.elements.iterator(); assertTrue(iterator.hasNext()); assertSame(this.point, iterator.next()); assertTrue(iterator.hasNext()); assertSame(this.multiPoint, iterator.next()); assertTrue(iterator.hasNext()); assertSame(this.polyline, iterator.next()); assertTrue(iterator.hasNext()); assertSame(this.polygon, iterator.next()); assertTrue(iterator.hasNext()); assertSame(this.circle, iterator.next()); assertFalse(iterator.hasNext()); }