java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeBD
All Implemented Interfaces:
AreaSizeBDType, AreaSizeValuesBDType

public final class AreaSizeBD extends Object implements AreaSizeBDType
The size of an area with BigDecimal coordinates.
  • Method Details

    • width

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

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

      public BigDecimal sizeX()
      Specified by:
      sizeX in interface AreaSizeBDType
      Specified by:
      sizeX in interface AreaSizeValuesBDType
      Returns:
      The value of the sizeX attribute
    • sizeY

      public BigDecimal sizeY()
      Specified by:
      sizeY in interface AreaSizeBDType
      Specified by:
      sizeY in interface AreaSizeValuesBDType
      Returns:
      The value of the sizeY attribute
    • withSizeX

      public final AreaSizeBD withSizeX(BigDecimal 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 AreaSizeBD withSizeY(BigDecimal 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 AreaSizeBD 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 AreaSizeBD with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

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

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

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