Class AreaYSplitBD<T extends AreaBDType>
java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaYSplitBD<T>
- Type Parameters:
T
- The precise type of area
- All Implemented Interfaces:
AreaYSplitBDType<T>
An area that has been split via the Y axis.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
AreaYSplitBD.Builder<T extends AreaBDType>
Builds instances of typeAreaYSplitBD
. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AreaBDType>
AreaYSplitBD.Builder<T>builder()
Creates a builder forAreaYSplitBD
.static <T extends AreaBDType>
AreaYSplitBD<T>copyOf
(AreaYSplitBDType<T> instance) Creates an immutable copy of aAreaYSplitBDType
value.boolean
This instance is equal to all instances ofAreaYSplitBD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:lower
,upper
.lower()
static <T extends AreaBDType>
AreaYSplitBD<T>of
(T lower, T upper) Construct a new immutableAreaYSplitBD
instance.toString()
Prints the immutable valueAreaYSplitBD
with attribute values.upper()
final AreaYSplitBD<T>
Copy the current immutable object by setting a value for thelower
attribute.final AreaYSplitBD<T>
Copy the current immutable object by setting a value for theupper
attribute.
-
Method Details
-
lower
- Specified by:
lower
in interfaceAreaYSplitBDType<T extends AreaBDType>
- Returns:
- The lower half
-
upper
- Specified by:
upper
in interfaceAreaYSplitBDType<T extends AreaBDType>
- 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 ofAreaYSplitBD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:lower
,upper
. -
toString
Prints the immutable valueAreaYSplitBD
with attribute values. -
of
Construct a new immutableAreaYSplitBD
instance.- Type Parameters:
T
- generic parameter T- Parameters:
lower
- The value for thelower
attributeupper
- The value for theupper
attribute- Returns:
- An immutable AreaYSplitBD instance
-
copyOf
Creates an immutable copy of aAreaYSplitBDType
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:
T
- generic parameter T- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable AreaYSplitBD instance
-
builder
Creates a builder forAreaYSplitBD
.AreaYSplitBD.<T>builder() .setLower(T) // required
lower
.setUpper(T) // requiredupper
.build();- Type Parameters:
T
- generic parameter T- Returns:
- A new AreaYSplitBD builder
-