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

# Class AreaBD

java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaBD

All Implemented Interfaces:
  `AreaBDType`, `AreaValuesBDType`, `AreaSizeValuesBDType`

public final class AreaBD extends Object implements AreaBDType

An area with `BigDecimal` coordinates.

The coordinates of the area are given in half-closed form. That is, `minimumX()` refers to the minimum inclusive value on the X axis, and `maximumX()` refers to the maximum exclusive value on the X axis. Likewise for the Y axis.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `AreaBD.Builder`
  Builds instances of type `AreaBD`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static AreaBD.Builder`
  `builder()`
  Creates a builder for `AreaBD`.
  `static AreaBD`
  `copyOf(AreaBDType instance)`
  Creates an immutable copy of a `AreaBDType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `AreaBD` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `minimumX`, `maximumX`, `minimumY`, `maximumY`.
  `BigDecimal`
  `height()`
  Deprecated.
  Use `AreaValuesBDType.sizeY()`
  `BigDecimal`
  `maximumX()`
  `BigDecimal`
  `maximumY()`
  `BigDecimal`
  `minimumX()`
  `BigDecimal`
  `minimumY()`
  `static AreaBD`
  `of(BigDecimal minimumX, BigDecimal maximumX, BigDecimal minimumY, BigDecimal maximumY)`
  Construct a new immutable `AreaBD` instance.
  `String`
  `toString()`
  Prints the immutable value `AreaBD` with attribute values.
  `BigDecimal`
  `width()`
  Deprecated.
  Use `AreaValuesBDType.sizeX()`
  `final AreaBD`
  `withMaximumX(BigDecimal value)`
  Copy the current immutable object by setting a value for the `maximumX` attribute.
  `final AreaBD`
  `withMaximumY(BigDecimal value)`
  Copy the current immutable object by setting a value for the `maximumY` attribute.
  `final AreaBD`
  `withMinimumX(BigDecimal value)`
  Copy the current immutable object by setting a value for the `minimumX` attribute.
  `final AreaBD`
  `withMinimumY(BigDecimal value)`
  Copy the current immutable object by setting a value for the `minimumY` attribute.

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

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

  ### Methods inherited from interface com.io7m.jregions.core.unparameterized.areas.AreaBDType

  `checkPreconditions`

  ### Methods inherited from interface com.io7m.jregions.core.unparameterized.areas.AreaValuesBDType

  `sizeX, sizeY`

- ## Method Details

  - ### width

    @Deprecated public BigDecimal width()
    Deprecated.
    Use `AreaValuesBDType.sizeX()`
    Specified by:
      `width` in interface `AreaSizeValuesBDType`
    Returns:
      The width of the area

  - ### height

    @Deprecated public BigDecimal height()
    Deprecated.
    Use `AreaValuesBDType.sizeY()`
    Specified by:
      `height` in interface `AreaSizeValuesBDType`
    Returns:
      The height of the area

  - ### minimumX

    public BigDecimal minimumX()
    Specified by:
      `minimumX` in interface `AreaBDType`
    Specified by:
      `minimumX` in interface `AreaValuesBDType`
    Returns:
      The value of the `minimumX` attribute

  - ### maximumX

    public BigDecimal maximumX()
    Specified by:
      `maximumX` in interface `AreaBDType`
    Specified by:
      `maximumX` in interface `AreaValuesBDType`
    Returns:
      The value of the `maximumX` attribute

  - ### minimumY

    public BigDecimal minimumY()
    Specified by:
      `minimumY` in interface `AreaBDType`
    Specified by:
      `minimumY` in interface `AreaValuesBDType`
    Returns:
      The value of the `minimumY` attribute

  - ### maximumY

    public BigDecimal maximumY()
    Specified by:
      `maximumY` in interface `AreaBDType`
    Specified by:
      `maximumY` in interface `AreaValuesBDType`
    Returns:
      The value of the `maximumY` attribute

  - ### withMinimumX

    public final AreaBD withMinimumX(BigDecimal value)
    Copy the current immutable object by setting a value for the `minimumX` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for minimumX
    Returns:
      A modified copy of the `this` object

  - ### withMaximumX

    public final AreaBD withMaximumX(BigDecimal value)
    Copy the current immutable object by setting a value for the `maximumX` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for maximumX
    Returns:
      A modified copy of the `this` object

  - ### withMinimumY

    public final AreaBD withMinimumY(BigDecimal value)
    Copy the current immutable object by setting a value for the `minimumY` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for minimumY
    Returns:
      A modified copy of the `this` object

  - ### withMaximumY

    public final AreaBD withMaximumY(BigDecimal value)
    Copy the current immutable object by setting a value for the `maximumY` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for maximumY
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `AreaBD` 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: `minimumX`, `maximumX`, `minimumY`, `maximumY`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### of

    public static AreaBD of(BigDecimal minimumX, BigDecimal maximumX, BigDecimal minimumY, BigDecimal maximumY)
    Construct a new immutable `AreaBD` instance.
    Parameters:
      `minimumX` - The value for the `minimumX` attribute
      `maximumX` - The value for the `maximumX` attribute
      `minimumY` - The value for the `minimumY` attribute
      `maximumY` - The value for the `maximumY` attribute
    Returns:
      An immutable AreaBD instance

  - ### copyOf

    public static AreaBD copyOf(AreaBDType instance)
    Creates an immutable copy of a `AreaBDType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable AreaBD instance

  - ### builder

    public static AreaBD.Builder builder()
    Creates a builder for `AreaBD`.

         AreaBD.builder()
            .setMinimumX(java.math.BigDecimal) // required minimumX
            .setMaximumX(java.math.BigDecimal) // required maximumX
            .setMinimumY(java.math.BigDecimal) // required minimumY
            .setMaximumY(java.math.BigDecimal) // required maximumY
            .build();

    Returns:
      A new AreaBD builder