java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeL
All Implemented Interfaces:
VolumeSizeLType, VolumeSizeValuesLType

public final class VolumeSizeL
extends java.lang.Object
implements VolumeSizeLType
The size of a volume with long coordinates.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  VolumeSizeL.Builder
    Builds instances of type VolumeSizeL.
  • Method Summary

    Modifier and Type Method Description
    static VolumeSizeL.Builder builder()
    Creates a builder for VolumeSizeL.
    static VolumeSizeL copyOf​(VolumeSizeLType instance)
    Creates an immutable copy of a VolumeSizeLType value.
    boolean equals​(java.lang.Object another)
    This instance is equal to all instances of VolumeSizeL that have equal attribute values.
    int hashCode()
    Computes a hash code from attributes: sizeX, sizeY, sizeZ.
    static VolumeSizeL of​(long sizeX, long sizeY, long sizeZ)
    Construct a new immutable VolumeSizeL instance.
    long sizeX()  
    long sizeY()  
    long sizeZ()  
    java.lang.String toString()
    Prints the immutable value VolumeSizeL with attribute values.
    VolumeSizeL withSizeX​(long value)
    Copy the current immutable object by setting a value for the sizeX attribute.
    VolumeSizeL withSizeY​(long value)
    Copy the current immutable object by setting a value for the sizeY attribute.
    VolumeSizeL withSizeZ​(long value)
    Copy the current immutable object by setting a value for the sizeZ attribute.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • sizeX

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

      public long sizeY()
      Specified by:
      sizeY in interface VolumeSizeLType
      Specified by:
      sizeY in interface VolumeSizeValuesLType
      Returns:
      The value of the sizeY attribute
    • sizeZ

      public long sizeZ()
      Specified by:
      sizeZ in interface VolumeSizeLType
      Specified by:
      sizeZ in interface VolumeSizeValuesLType
      Returns:
      The value of the sizeZ attribute
    • withSizeX

      public final VolumeSizeL 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 VolumeSizeL 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
    • withSizeZ

      public final VolumeSizeL withSizeZ​(long value)
      Copy the current immutable object by setting a value for the sizeZ attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sizeZ
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of VolumeSizeL 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, sizeZ.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

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

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

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

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