Package com.io7m.jregions.core.parameterized.sizes

# Class PAreaSizeBI<S>

java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PAreaSizeBI<S>

Type Parameters:
  `S` - A phantom type parameter indicating the coordinate space of the area

All Implemented Interfaces:
  `PAreaSizeBIType<S>`, `AreaSizeValuesBIType`

    public final class PAreaSizeBI<S>
    extends java.lang.Object
    implements PAreaSizeBIType<S>

The size of an area with `BigInteger` coordinates.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `PAreaSizeBI.Builder<S>` | Builds instances of type `PAreaSizeBI`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static <S> PAreaSizeBI.Builder<S>` | `builder()` | Creates a builder for `PAreaSizeBI`.
  `static <S> PAreaSizeBI<S>` | `copyOf​(PAreaSizeBIType<S> instance)` | Creates an immutable copy of a `PAreaSizeBIType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `PAreaSizeBI` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `sizeX`, `sizeY`.
  `java.math.BigInteger` | `height()` | Deprecated. Use `sizeY()`
  `static <S> PAreaSizeBI<S>` | `of​(java.math.BigInteger sizeX, java.math.BigInteger sizeY)` | Construct a new immutable `PAreaSizeBI` instance.
  `java.math.BigInteger` | `sizeX()` |
  `java.math.BigInteger` | `sizeY()` |
  `java.lang.String` | `toString()` | Prints the immutable value `PAreaSizeBI` with attribute values.
  `java.math.BigInteger` | `width()` | Deprecated. Use `sizeX()`
  `PAreaSizeBI<S>` | `withSizeX​(java.math.BigInteger value)` | Copy the current immutable object by setting a value for the `sizeX` attribute.
  `PAreaSizeBI<S>` | `withSizeY​(java.math.BigInteger value)` | Copy the current immutable object by setting a value for the `sizeY` attribute.

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

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

  ### Methods inherited from interface com.io7m.jregions.core.parameterized.sizes.PAreaSizeBIType

  `checkPreconditions`

- ## Method Details

  - ### width

    @Deprecated public java.math.BigInteger width()
    Deprecated.
    Use `sizeX()`
    Specified by:
      `width` in interface `AreaSizeValuesBIType`
    Returns:
      The width of the area

  - ### height

    @Deprecated public java.math.BigInteger height()
    Deprecated.
    Use `sizeY()`
    Specified by:
      `height` in interface `AreaSizeValuesBIType`
    Returns:
      The height of the area

  - ### sizeX

    public java.math.BigInteger sizeX()
    Specified by:
      `sizeX` in interface `AreaSizeValuesBIType`
    Specified by:
      `sizeX` in interface `PAreaSizeBIType<S>`
    Returns:
      The value of the `sizeX` attribute

  - ### sizeY

    public java.math.BigInteger sizeY()
    Specified by:
      `sizeY` in interface `AreaSizeValuesBIType`
    Specified by:
      `sizeY` in interface `PAreaSizeBIType<S>`
    Returns:
      The value of the `sizeY` attribute

  - ### withSizeX

    public final PAreaSizeBI<S> withSizeX​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the `sizeX` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for sizeX
    Returns:
      A modified copy of the `this` object

  - ### withSizeY

    public final PAreaSizeBI<S> withSizeY​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the `sizeY` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for sizeY
    Returns:
      A modified copy of the `this` object

  - ### equals

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

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `sizeX`, `sizeY`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static <S> PAreaSizeBI<S> of​(java.math.BigInteger sizeX, java.math.BigInteger sizeY)
    Construct a new immutable `PAreaSizeBI` instance.
    Type Parameters:
      `S` - generic parameter S
    Parameters:
      `sizeX` - The value for the `sizeX` attribute
      `sizeY` - The value for the `sizeY` attribute
    Returns:
      An immutable PAreaSizeBI instance

  - ### copyOf

    public static <S> PAreaSizeBI<S> copyOf​(PAreaSizeBIType<S> instance)
    Creates an immutable copy of a `PAreaSizeBIType` 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:
      `S` - generic parameter S
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable PAreaSizeBI instance

  - ### builder

    public static <S> PAreaSizeBI.Builder<S> builder()
    Creates a builder for `PAreaSizeBI`.

         PAreaSizeBI.&lt;S&gt;builder()
            .setSizeX(java.math.BigInteger) // required sizeX
            .setSizeY(java.math.BigInteger) // required sizeY
            .build();

    Type Parameters:
      `S` - generic parameter S
    Returns:
      A new PAreaSizeBI builder