Class PAreaXSplitF<S,T extends PAreaFType<S>>
java.lang.Object
com.io7m.jregions.core.parameterized.areas.PAreaXSplitF<S,T>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the areaT- The precise type of area
- All Implemented Interfaces:
PAreaXSplitFType<S,T>
public final class PAreaXSplitF<S,T extends PAreaFType<S>> extends java.lang.Object implements PAreaXSplitFType<S,T>
An area that has been split via the X axis.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPAreaXSplitF.Builder<S,T extends PAreaFType<S>>Builds instances of typePAreaXSplitF. -
Method Summary
Modifier and Type Method Description static <S, T extends PAreaFType<S>>
PAreaXSplitF.Builder<S,T>builder()Creates a builder forPAreaXSplitF.static <S, T extends PAreaFType<S>>
PAreaXSplitF<S,T>copyOf(PAreaXSplitFType<S,T> instance)Creates an immutable copy of aPAreaXSplitFTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofPAreaXSplitFthat have equal attribute values.inthashCode()Computes a hash code from attributes:lower,upper.Tlower()static <S, T extends PAreaFType<S>>
PAreaXSplitF<S,T>of(T lower, T upper)Construct a new immutablePAreaXSplitFinstance.java.lang.StringtoString()Prints the immutable valuePAreaXSplitFwith attribute values.Tupper()PAreaXSplitF<S,T>withLower(T value)Copy the current immutable object by setting a value for thelowerattribute.PAreaXSplitF<S,T>withUpper(T value)Copy the current immutable object by setting a value for theupperattribute.
-
Method Details
-
lower
- Specified by:
lowerin interfacePAreaXSplitFType<S,T extends PAreaFType<S>>- Returns:
- The lower half
-
upper
- Specified by:
upperin interfacePAreaXSplitFType<S,T extends PAreaFType<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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofPAreaXSplitFthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:lower,upper.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valuePAreaXSplitFwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutablePAreaXSplitFinstance.- Type Parameters:
S- generic parameter ST- generic parameter T- Parameters:
lower- The value for thelowerattributeupper- The value for theupperattribute- Returns:
- An immutable PAreaXSplitF instance
-
copyOf
public static <S, T extends PAreaFType<S>> PAreaXSplitF<S,T> copyOf(PAreaXSplitFType<S,T> instance)Creates an immutable copy of aPAreaXSplitFTypevalue. 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 PAreaXSplitF instance
-
builder
Creates a builder forPAreaXSplitF.PAreaXSplitF.<S, T>builder() .setLower(T) // requiredlower.setUpper(T) // requiredupper.build();- Type Parameters:
S- generic parameter ST- generic parameter T- Returns:
- A new PAreaXSplitF builder
-