@Override public void clear() { this.path.clear(); }
@Override public void clear() { this.shape.clear(); PathIterator2afp pi = this.shape.getPathIterator(); assertNoElement(pi); }
/** */ @Test public void size() { assertEquals(7, this.collection.size()); this.shape.removeLast(); assertEquals(7, this.collection.size()); this.shape.removeLast(); assertEquals(4, this.collection.size()); this.shape.clear(); assertEquals(0, this.collection.size()); }
/** */ @Test public void isEmpty() { assertFalse(this.collection.isEmpty()); this.shape.removeLast(); assertFalse(this.collection.isEmpty()); this.shape.removeLast(); assertFalse(this.collection.isEmpty()); this.shape.clear(); assertTrue(this.collection.isEmpty()); }
/** Set the path. * @param path the path to copy. */ default void set(Path2afp<?, ?, ?, ?, ?, ?> path) { assert path != null : AssertMessages.notNullParameter(); clear(); add(path.getPathIterator()); }
@Override public void isEmpty() { assertFalse(this.shape.isEmpty()); this.shape.clear(); assertTrue(this.shape.isEmpty()); }
/** */ @Test public void add() { assertTrue(this.collection.add(this.factory.createPoint(123, 456))); assertCoords(1, 1, 2, 2, 3, 0, 4, 3, 5, -1, 6, 5, 7, -5, 123, 456); this.shape.clear(); assertCoords(); assertTrue(this.collection.add(this.factory.createPoint(123, 456))); assertCoords(123, 456); assertTrue(this.collection.add(this.factory.createPoint(789, 1011))); assertCoords(123, 456, 789, 1011); }
assertTrue(this.shape.isCurved()); this.shape.clear(); assertFalse(this.shape.isCurved()); assertFalse(this.shape.isCurved()); this.shape.clear(); assertFalse(this.shape.isCurved()); assertFalse(this.shape.isCurved()); this.shape.clear(); assertFalse(this.shape.isCurved()); assertTrue(this.shape.isCurved()); this.shape.clear(); assertFalse(this.shape.isCurved());
assertFalse(this.shape.isPolyline()); this.shape.clear(); assertFalse(this.shape.isPolyline()); assertFalse(this.shape.isPolyline()); this.shape.clear(); assertFalse(this.shape.isPolyline()); assertFalse(this.shape.isPolyline()); this.shape.clear(); assertFalse(this.shape.isPolygon()); assertFalse(this.shape.isPolyline()); this.shape.clear(); assertFalse(this.shape.isPolyline()); assertFalse(this.shape.isPolyline()); this.shape.clear(); assertFalse(this.shape.isPolyline()); this.shape.moveTo(1, 2);
assertFalse(this.shape.isPolygon()); this.shape.clear(); assertFalse(this.shape.isPolygon()); assertTrue(this.shape.isPolygon()); this.shape.clear(); assertFalse(this.shape.isPolygon()); assertTrue(this.shape.isPolygon()); this.shape.clear(); assertFalse(this.shape.isPolygon()); assertTrue(this.shape.isPolygon()); this.shape.clear(); assertFalse(this.shape.isPolygon());