Class PAreaXSplitI<S,T extends PAreaIType<S>>
java.lang.Object
com.io7m.jregions.core.parameterized.areas.PAreaXSplitI<S,T>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the areaT
- The precise type of area
- All Implemented Interfaces:
PAreaXSplitIType<S,
T>
public final class PAreaXSplitI<S,T extends PAreaIType<S>>
extends Object
implements PAreaXSplitIType<S,T>
An area that has been split via the X axis.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
PAreaXSplitI.Builder<S,
T extends PAreaIType<S>> Builds instances of typePAreaXSplitI
. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,
T extends PAreaIType<S>>
PAreaXSplitI.Builder<S,T> builder()
Creates a builder forPAreaXSplitI
.static <S,
T extends PAreaIType<S>>
PAreaXSplitI<S,T> copyOf
(PAreaXSplitIType<S, T> instance) Creates an immutable copy of aPAreaXSplitIType
value.boolean
This instance is equal to all instances ofPAreaXSplitI
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:lower
,upper
.lower()
static <S,
T extends PAreaIType<S>>
PAreaXSplitI<S,T> of
(T lower, T upper) Construct a new immutablePAreaXSplitI
instance.toString()
Prints the immutable valuePAreaXSplitI
with attribute values.upper()
final PAreaXSplitI<S,
T> Copy the current immutable object by setting a value for thelower
attribute.final PAreaXSplitI<S,
T> Copy the current immutable object by setting a value for theupper
attribute.
-
Method Details
-
lower
- Specified by:
lower
in interfacePAreaXSplitIType<S,
T extends PAreaIType<S>> - Returns:
- The lower half
-
upper
- Specified by:
upper
in interfacePAreaXSplitIType<S,
T extends PAreaIType<S>> - Returns:
- The upper half
-
withLower
Copy the current immutable object by setting a value for thelower
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for lower- Returns:
- A modified copy of the
this
object
-
withUpper
Copy the current immutable object by setting a value for theupper
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for upper- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofPAreaXSplitI
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:lower
,upper
. -
toString
Prints the immutable valuePAreaXSplitI
with attribute values. -
of
Construct a new immutablePAreaXSplitI
instance.- Type Parameters:
S
- generic parameter ST
- generic parameter T- Parameters:
lower
- The value for thelower
attributeupper
- The value for theupper
attribute- Returns:
- An immutable PAreaXSplitI instance
-
copyOf
Creates an immutable copy of aPAreaXSplitIType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
S
- generic parameter ST
- generic parameter T- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable PAreaXSplitI instance
-
builder
Creates a builder forPAreaXSplitI
.PAreaXSplitI.<S, T>builder() .setLower(T) // required
lower
.setUpper(T) // requiredupper
.build();- Type Parameters:
S
- generic parameter ST
- generic parameter T- Returns:
- A new PAreaXSplitI builder
-