math.geom2d
Interface ShapeSet2D<T extends Shape2D>
-
- All Superinterfaces:
- GeometricObject2D, java.lang.Iterable<T>, Shape2D
- All Known Subinterfaces:
- CirculinearCurveSet2D<T>, CurveSet2D<T>, DomainSet2D<T>, PointSet2D
- All Known Implementing Classes:
- BoundaryPolyCirculinearCurve2D, BoundaryPolyCurve2D, CirculinearContourArray2D, CirculinearCurveArray2D, ContourArray2D, CurveArray2D, DomainArray2D, GenericCirculinearRing2D, Hyperbola2D, PointArray2D, PolyCirculinearCurve2D, PolyCubicBezierCurve2D, PolyCurve2D, PolyOrientedCurve2D, ShapeArray2D
public interface ShapeSet2D<T extends Shape2D> extends Shape2D, java.lang.Iterable<T>
A shape that is composed of several other shapes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(int index, T shape)Inserts the specified shape at the specified position in this set (optional operation).booleanadd(T shape)Appends the specified shape to the end of this set (optional operation).voidclear()Removes all the shapes stored in this set.booleancontains(T shape)Returns true if this set contains the shape.Tget(int index)Returns the shape at a given position.intindexOf(T shape)Returns the index of the shape in this set.Tremove(int index)Removes the shape at the specified position in this set (optional operation).booleanremove(T shape)Removes the first occurrence of the specified element from this list, if it is present.intsize()Returns the number of shapes stored in this set.-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, clip, contains, contains, distance, distance, draw, isBounded, isEmpty, transform
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Method Detail
-
add
boolean add(T shape)
Appends the specified shape to the end of this set (optional operation).
-
add
void add(int index, T shape)Inserts the specified shape at the specified position in this set (optional operation).
-
get
T get(int index)
Returns the shape at a given position.- Parameters:
index- the position of the shape- Returns:
- the shape at the given position
-
remove
boolean remove(T shape)
Removes the first occurrence of the specified element from this list, if it is present. If the list does not contain the element, it is unchanged. Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).
-
remove
T remove(int index)
Removes the shape at the specified position in this set (optional operation).
-
contains
boolean contains(T shape)
Returns true if this set contains the shape.
-
indexOf
int indexOf(T shape)
Returns the index of the shape in this set.
-
size
int size()
Returns the number of shapes stored in this set.
-
clear
void clear()
Removes all the shapes stored in this set.
-
-
DMelt 3.0 © DataMelt by jWork.ORG