@Test public void testRank() { Assert.assertEquals(Figure.Rank.POINT, SimpleFeatureShapeFigure.getRank(createPoint())); Assert.assertEquals(Figure.Rank.POINT, SimpleFeatureShapeFigure.getRank(createMultiPoint())); Assert.assertEquals(Figure.Rank.LINE, SimpleFeatureShapeFigure.getRank(createLineString())); Assert.assertEquals(Figure.Rank.LINE, SimpleFeatureShapeFigure.getRank(createLinearRing())); Assert.assertEquals(Figure.Rank.LINE, SimpleFeatureShapeFigure.getRank(createMultiLineString())); Assert.assertEquals(Figure.Rank.AREA, SimpleFeatureShapeFigure.getRank(createPolygon())); Assert.assertEquals(Figure.Rank.AREA, SimpleFeatureShapeFigure.getRank(createMultiPolygon())); Assert.assertEquals(Figure.Rank.NOT_SPECIFIED, SimpleFeatureShapeFigure.getRank(createGeometryCollection())); }
static Rank getRank(SimpleFeature simpleFeature) { final Object geometry = simpleFeature.getDefaultGeometry(); if (!(geometry instanceof Geometry)) { throw new IllegalArgumentException("simpleFeature: geometry type must be a " + Geometry.class); } return getRank((Geometry) geometry); }
SimpleFeatureShapeFigure extends AbstractShapeFigure implements SimpleFeatureFigure { static Rank getRank(SimpleFeature simpleFeature) { final Object geometry = simpleFeature.getDefaultGeometry(); if (!(geometry instanceof Geometry)) { throw new IllegalArgumentException("simpleFeature: geometry type must be a " + Geometry.class); } return getRank((Geometry) geometry); } }
SimpleFeatureShapeFigure extends AbstractShapeFigure implements SimpleFeatureFigure { static Rank getRank(SimpleFeature simpleFeature) { final Object geometry = simpleFeature.getDefaultGeometry(); if (!(geometry instanceof Geometry)) { throw new IllegalArgumentException("simpleFeature: geometry type must be a " + Geometry.class); } return getRank((Geometry) geometry); } SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); }
SimpleFeatureShapeFigure extends AbstractShapeFigure implements SimpleFeatureFigure { static Rank getRank(SimpleFeature simpleFeature) { final Object geometry = simpleFeature.getDefaultGeometry(); if (!(geometry instanceof Geometry)) { throw new IllegalArgumentException("simpleFeature: geometry type must be a " + Geometry.class); } return getRank((Geometry) geometry); } SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); @Override Object createMemento(); @Override void setMemento(Object memento); @Override SimpleFeature getSimpleFeature(); @Override Geometry getGeometry(); @Override void setGeometry(Geometry geometry); @Override Shape getShape(); @Override void forceRegeneration(); @Override void setShape(Shape shape); @Override Object clone(); }
SimpleFeatureShapeFigure extends AbstractShapeFigure implements SimpleFeatureFigure { static Rank getRank(SimpleFeature simpleFeature) { final Object geometry = simpleFeature.getDefaultGeometry(); if (!(geometry instanceof Geometry)) { throw new IllegalArgumentException("simpleFeature: geometry type must be a " + Geometry.class); } return getRank((Geometry) geometry); } SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeatureShapeFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); @Override Object createMemento(); @Override void setMemento(Object memento); @Override SimpleFeature getSimpleFeature(); @Override Geometry getGeometry(); @Override void setGeometry(Geometry geometry); @Override Shape getShape(); @Override void forceRegeneration(); @Override void setShape(Shape shape); @Override Object clone();  }