java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeBI
All Implemented Interfaces:
AreaSizeBIType, AreaSizeValuesBIType

public final class AreaSizeBI extends Object implements AreaSizeBIType
The size of an area with BigInteger coordinates.
  • Method Details

    • width

      @Deprecated public BigInteger width()
      Deprecated.
      Specified by:
      width in interface AreaSizeValuesBIType
      Returns:
      The width of the area
    • height

      @Deprecated public BigInteger height()
      Deprecated.
      Specified by:
      height in interface AreaSizeValuesBIType
      Returns:
      The height of the area
    • sizeX

      public BigInteger sizeX()
      Specified by:
      sizeX in interface AreaSizeBIType
      Specified by:
      sizeX in interface AreaSizeValuesBIType
      Returns:
      The value of the sizeX attribute
    • sizeY

      public BigInteger sizeY()
      Specified by:
      sizeY in interface AreaSizeBIType
      Specified by:
      sizeY in interface AreaSizeValuesBIType
      Returns:
      The value of the sizeY attribute
    • withSizeX

      public final AreaSizeBI withSizeX(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 AreaSizeBI withSizeY(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(Object another)
      This instance is equal to all instances of AreaSizeBI 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: sizeX, sizeY.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static AreaSizeBI of(BigInteger sizeX, BigInteger sizeY)
      Construct a new immutable AreaSizeBI instance.
      Parameters:
      sizeX - The value for the sizeX attribute
      sizeY - The value for the sizeY attribute
      Returns:
      An immutable AreaSizeBI instance
    • copyOf

      public static AreaSizeBI copyOf(AreaSizeBIType instance)
      Creates an immutable copy of a AreaSizeBIType 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 AreaSizeBI instance
    • builder

      public static AreaSizeBI.Builder builder()
      Creates a builder for AreaSizeBI.
       AreaSizeBI.builder()
          .setSizeX(java.math.BigInteger) // required sizeX
          .setSizeY(java.math.BigInteger) // required sizeY
          .build();
       
      Returns:
      A new AreaSizeBI builder