Class AreaXSplitBD<T extends AreaBDType>
java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaXSplitBD<T>
- Type Parameters:
T- The precise type of area
- All Implemented Interfaces:
AreaXSplitBDType<T>
An area that has been split via the X axis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAreaXSplitBD.Builder<T extends AreaBDType>Builds instances of typeAreaXSplitBD. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AreaBDType>
AreaXSplitBD.Builder<T>builder()Creates a builder forAreaXSplitBD.static <T extends AreaBDType>
AreaXSplitBD<T>copyOf(AreaXSplitBDType<T> instance) Creates an immutable copy of aAreaXSplitBDTypevalue.booleanThis instance is equal to all instances ofAreaXSplitBDthat have equal attribute values.inthashCode()Computes a hash code from attributes:lower,upper.lower()static <T extends AreaBDType>
AreaXSplitBD<T>of(T lower, T upper) Construct a new immutableAreaXSplitBDinstance.toString()Prints the immutable valueAreaXSplitBDwith attribute values.upper()final AreaXSplitBD<T>Copy the current immutable object by setting a value for thelowerattribute.final AreaXSplitBD<T>Copy the current immutable object by setting a value for theupperattribute.
-
Method Details
-
lower
- Specified by:
lowerin interfaceAreaXSplitBDType<T extends AreaBDType>- Returns:
- The lower half
-
upper
- Specified by:
upperin interfaceAreaXSplitBDType<T extends AreaBDType>- 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 ofAreaXSplitBDthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:lower,upper. -
toString
Prints the immutable valueAreaXSplitBDwith attribute values. -
of
Construct a new immutableAreaXSplitBDinstance.- Type Parameters:
T- generic parameter T- Parameters:
lower- The value for thelowerattributeupper- The value for theupperattribute- Returns:
- An immutable AreaXSplitBD instance
-
copyOf
Creates an immutable copy of aAreaXSplitBDTypevalue. 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 AreaXSplitBD instance
-
builder
Creates a builder forAreaXSplitBD.AreaXSplitBD.<T>builder() .setLower(T) // requiredlower.setUpper(T) // requiredupper.build();- Type Parameters:
T- generic parameter T- Returns:
- A new AreaXSplitBD builder
-