Class AreaXSplitL<T extends AreaLType>
java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaXSplitL<T>
- Type Parameters:
T- The precise type of area
- All Implemented Interfaces:
AreaXSplitLType<T>
public final class AreaXSplitL<T extends AreaLType> extends java.lang.Object implements AreaXSplitLType<T>
An area that has been split via the X axis.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAreaXSplitL.Builder<T extends AreaLType>Builds instances of typeAreaXSplitL. -
Method Summary
Modifier and Type Method Description static <T extends AreaLType>
AreaXSplitL.Builder<T>builder()Creates a builder forAreaXSplitL.static <T extends AreaLType>
AreaXSplitL<T>copyOf(AreaXSplitLType<T> instance)Creates an immutable copy of aAreaXSplitLTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofAreaXSplitLthat have equal attribute values.inthashCode()Computes a hash code from attributes:lower,upper.Tlower()static <T extends AreaLType>
AreaXSplitL<T>of(T lower, T upper)Construct a new immutableAreaXSplitLinstance.java.lang.StringtoString()Prints the immutable valueAreaXSplitLwith attribute values.Tupper()AreaXSplitL<T>withLower(T value)Copy the current immutable object by setting a value for thelowerattribute.AreaXSplitL<T>withUpper(T value)Copy the current immutable object by setting a value for theupperattribute.
-
Method Details
-
lower
- Specified by:
lowerin interfaceAreaXSplitLType<T extends AreaLType>- Returns:
- The lower half
-
upper
- Specified by:
upperin interfaceAreaXSplitLType<T extends AreaLType>- 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 ofAreaXSplitLthat 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 valueAreaXSplitLwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableAreaXSplitLinstance.- Type Parameters:
T- generic parameter T- Parameters:
lower- The value for thelowerattributeupper- The value for theupperattribute- Returns:
- An immutable AreaXSplitL instance
-
copyOf
Creates an immutable copy of aAreaXSplitLTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AreaXSplitL instance
-
builder
Creates a builder forAreaXSplitL.AreaXSplitL.<T>builder() .setLower(T) // requiredlower.setUpper(T) // requiredupper.build();- Type Parameters:
T- generic parameter T- Returns:
- A new AreaXSplitL builder
-