Package com.io7m.jregions.core.unparameterized.areas

# Class AreaYSplitI<T extends AreaIType>

java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaYSplitI<T>

Type Parameters:
  `T` - The precise type of area

All Implemented Interfaces:
  `AreaYSplitIType<T>`

public final class AreaYSplitI<T extends AreaIType> extends Object implements AreaYSplitIType<T>
An area that has been split via the Y axis.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `AreaYSplitI.Builder<T extends AreaIType>`
  Builds instances of type `AreaYSplitI`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <T extends AreaIType>
  AreaYSplitI.Builder<T>`
  `builder()`
  Creates a builder for `AreaYSplitI`.
  `static <T extends AreaIType>
  AreaYSplitI<T>`
  `copyOf(AreaYSplitIType<T> instance)`
  Creates an immutable copy of a `AreaYSplitIType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `AreaYSplitI` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `lower`, `upper`.
  `T`
  `lower()`
  `static <T extends AreaIType>
  AreaYSplitI<T>`
  `of(T lower, T upper)`
  Construct a new immutable `AreaYSplitI` instance.
  `String`
  `toString()`
  Prints the immutable value `AreaYSplitI` with attribute values.
  `T`
  `upper()`
  `final AreaYSplitI<T>`
  `withLower(T value)`
  Copy the current immutable object by setting a value for the `lower` attribute.
  `final AreaYSplitI<T>`
  `withUpper(T value)`
  Copy the current immutable object by setting a value for the `upper` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### lower

    public T lower()
    Specified by:
      `lower` in interface `AreaYSplitIType<T extends AreaIType>`
    Returns:
      The lower half

  - ### upper

    public T upper()
    Specified by:
      `upper` in interface `AreaYSplitIType<T extends AreaIType>`
    Returns:
      The upper half

  - ### withLower

    public final AreaYSplitI<T> withLower(T value)
    Copy the current immutable object by setting a value for the `lower` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for lower
    Returns:
      A modified copy of the `this` object

  - ### withUpper

    public final AreaYSplitI<T> withUpper(T value)
    Copy the current immutable object by setting a value for the `upper` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for upper
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `AreaYSplitI` that have equal attribute values.
    Overrides:
      `equals` in class `Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `lower`, `upper`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `AreaYSplitI` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### of

    public static <T extends AreaIType> AreaYSplitI<T> of(T lower, T upper)
    Construct a new immutable `AreaYSplitI` instance.
    Type Parameters:
      `T` - generic parameter T
    Parameters:
      `lower` - The value for the `lower` attribute
      `upper` - The value for the `upper` attribute
    Returns:
      An immutable AreaYSplitI instance

  - ### copyOf

    public static <T extends AreaIType> AreaYSplitI<T> copyOf(AreaYSplitIType<T> instance)
    Creates an immutable copy of a `AreaYSplitIType` 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 AreaYSplitI instance

  - ### builder

    public static <T extends AreaIType> AreaYSplitI.Builder<T> builder()
    Creates a builder for `AreaYSplitI`.

         AreaYSplitI.&lt;T&gt;builder()
            .setLower(T) // required lower
            .setUpper(T) // required upper
            .build();

    Type Parameters:
      `T` - generic parameter T
    Returns:
      A new AreaYSplitI builder