Class PAreaXSplitL<S,T extends PAreaLType<S>>
java.lang.Object
com.io7m.jregions.core.parameterized.areas.PAreaXSplitL<S,T>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the areaT- The precise type of area
- All Implemented Interfaces:
PAreaXSplitLType<S,T>
public final class PAreaXSplitL<S,T extends PAreaLType<S>>
extends Object
implements PAreaXSplitLType<S,T>
An area that has been split via the X axis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classPAreaXSplitL.Builder<S,T extends PAreaLType<S>> Builds instances of typePAreaXSplitL. -
Method Summary
Modifier and TypeMethodDescriptionstatic <S,T extends PAreaLType<S>>
PAreaXSplitL.Builder<S,T> builder()Creates a builder forPAreaXSplitL.static <S,T extends PAreaLType<S>>
PAreaXSplitL<S,T> copyOf(PAreaXSplitLType<S, T> instance) Creates an immutable copy of aPAreaXSplitLTypevalue.booleanThis instance is equal to all instances ofPAreaXSplitLthat have equal attribute values.inthashCode()Computes a hash code from attributes:lower,upper.lower()static <S,T extends PAreaLType<S>>
PAreaXSplitL<S,T> of(T lower, T upper) Construct a new immutablePAreaXSplitLinstance.toString()Prints the immutable valuePAreaXSplitLwith attribute values.upper()final PAreaXSplitL<S,T> Copy the current immutable object by setting a value for thelowerattribute.final PAreaXSplitL<S,T> Copy the current immutable object by setting a value for theupperattribute.
-
Method Details
-
lower
- Specified by:
lowerin interfacePAreaXSplitLType<S,T extends PAreaLType<S>> - Returns:
- The lower half
-
upper
- Specified by:
upperin interfacePAreaXSplitLType<S,T extends PAreaLType<S>> - Returns:
- The upper half
-
withLower
Copy the current immutable object by setting a value for thelowerattribute. 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
thisobject
-
withUpper
Copy the current immutable object by setting a value for theupperattribute. 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
thisobject
-
equals
This instance is equal to all instances ofPAreaXSplitLthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:lower,upper. -
toString
Prints the immutable valuePAreaXSplitLwith attribute values. -
of
Construct a new immutablePAreaXSplitLinstance.- Type Parameters:
S- generic parameter ST- generic parameter T- Parameters:
lower- The value for thelowerattributeupper- The value for theupperattribute- Returns:
- An immutable PAreaXSplitL instance
-
copyOf
Creates an immutable copy of aPAreaXSplitLTypevalue. 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 PAreaXSplitL instance
-
builder
Creates a builder forPAreaXSplitL.PAreaXSplitL.<S, T>builder() .setLower(T) // requiredlower.setUpper(T) // requiredupper.build();- Type Parameters:
S- generic parameter ST- generic parameter T- Returns:
- A new PAreaXSplitL builder
-