java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeL
All Implemented Interfaces:
AreaSizeLType, AreaSizeValuesLType

public final class AreaSizeL extends Object implements AreaSizeLType
The size of an area with long coordinates.
  • Method Details

    • width

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

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

      public long sizeX()
      Specified by:
      sizeX in interface AreaSizeLType
      Specified by:
      sizeX in interface AreaSizeValuesLType
      Returns:
      The value of the sizeX attribute
    • sizeY

      public long sizeY()
      Specified by:
      sizeY in interface AreaSizeLType
      Specified by:
      sizeY in interface AreaSizeValuesLType
      Returns:
      The value of the sizeY attribute
    • withSizeX

      public final AreaSizeL withSizeX(long value)
      Copy the current immutable object by setting a value for the sizeX attribute. A value equality check is 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 AreaSizeL withSizeY(long value)
      Copy the current immutable object by setting a value for the sizeY attribute. A value equality check is 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 AreaSizeL 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 AreaSizeL with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

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

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

      public static AreaSizeL.Builder builder()
      Creates a builder for AreaSizeL.
       AreaSizeL.builder()
          .setSizeX(long) // required sizeX
          .setSizeY(long) // required sizeY
          .build();
       
      Returns:
      A new AreaSizeL builder