Class Split<T>
- java.lang.Object
-
- org.apache.commons.geometry.core.partitioning.Split<T>
-
- Type Parameters:
T
- Split type
public final class Split<T> extends java.lang.Object
Class containing the result of splitting an object with a hyperplane.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitLocation
getLocation()
Get the location of the object with respect to its splitting hyperplane.T
getMinus()
Get the part of the object lying on the minus side of the splitting hyperplane or null if no such part exists.T
getPlus()
Get the part of the object lying on the plus side of the splitting hyperplane or null if no such part exists.java.lang.String
toString()
-
-
-
Constructor Detail
-
Split
public Split(T minus, T plus)
Build a new instance from its parts.- Parameters:
minus
- part of the object lying on the minus side of the splitting hyperplane or null if no such part existsplus
- part of the object lying on the plus side of the splitting hyperplane or null if no such part exists.
-
-
Method Detail
-
getMinus
public T getMinus()
Get the part of the object lying on the minus side of the splitting hyperplane or null if no such part exists.- Returns:
- part of the object lying on the minus side of the splitting hyperplane
-
getPlus
public T getPlus()
Get the part of the object lying on the plus side of the splitting hyperplane or null if no such part exists.- Returns:
- part of the object lying on the plus side of the splitting hyperplane
-
getLocation
public SplitLocation getLocation()
Get the location of the object with respect to its splitting hyperplane.- Returns:
SplitLocation.PLUS
- if onlygetPlus()
is not nullSplitLocation.MINUS
- if onlygetMinus()
is not nullSplitLocation.BOTH
- if bothgetPlus()
andgetMinus()
are not nullSplitLocation.NEITHER
- if bothgetPlus()
andgetMinus()
are null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-