Class BoundaryList<P extends Point<P>,S extends HyperplaneConvexSubset<P>>
java.lang.Object
org.apache.commons.geometry.core.partitioning.BoundaryList<P,S>
- Type Parameters:
P
- Point implementation typeS
- Hyperplane convex subset implementation type
- All Implemented Interfaces:
BoundarySource<S>
- Direct Known Subclasses:
BoundaryList2D
,BoundaryList2S
,BoundaryList3D
public class BoundaryList<P extends Point<P>,S extends HyperplaneConvexSubset<P>>
extends Object
implements BoundarySource<S>
Simple implementation of
BoundarySource
containing boundaries stored in a list.
Lists given during construction are used directly; no copies are made. Thread safety and
immutability therefore depend on the underlying list and its usage outside of this class.
The boundary list cannot be modified through this class.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBoundaryList
(List<? extends S> boundaries) Construct a new instance containing the given boundaries. -
Method Summary
-
Field Details
-
boundaries
List of boundaries.
-
-
Constructor Details
-
BoundaryList
Construct a new instance containing the given boundaries. The input list is used directly; no copy is made.- Parameters:
boundaries
- boundary list
-
-
Method Details
-
getBoundaries
Get the boundaries for the instance. The returned list cannot be modified.- Returns:
- boundaries for the instance
-
count
public int count()Get the number of boundaries in the instance. This is exactly equivalent toboundaryList.getBoundaries().size()
but the word "size" is avoided here to prevent confusion with geometric size.- Returns:
- number of boundaries in the instance
-
boundaryStream
Return a stream containing the boundaries for this instance.- Specified by:
boundaryStream
in interfaceBoundarySource<P extends Point<P>>
- Returns:
- a stream containing the boundaries for this instance
-
toString
-