java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeD
All Implemented Interfaces:
VolumeSizeDType, VolumeSizeValuesDType

public final class VolumeSizeD extends Object implements VolumeSizeDType
The size of a volume with double coordinates.
  • Method Details

    • sizeX

      public double sizeX()
      Specified by:
      sizeX in interface VolumeSizeDType
      Specified by:
      sizeX in interface VolumeSizeValuesDType
      Returns:
      The value of the sizeX attribute
    • sizeY

      public double sizeY()
      Specified by:
      sizeY in interface VolumeSizeDType
      Specified by:
      sizeY in interface VolumeSizeValuesDType
      Returns:
      The value of the sizeY attribute
    • sizeZ

      public double sizeZ()
      Specified by:
      sizeZ in interface VolumeSizeDType
      Specified by:
      sizeZ in interface VolumeSizeValuesDType
      Returns:
      The value of the sizeZ attribute
    • withSizeX

      public final VolumeSizeD withSizeX(double value)
      Copy the current immutable object by setting a value for the sizeX attribute. A value strict bits equality 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 VolumeSizeD withSizeY(double value)
      Copy the current immutable object by setting a value for the sizeY attribute. A value strict bits equality 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 VolumeSizeD withSizeZ(double value)
      Copy the current immutable object by setting a value for the sizeZ attribute. A value strict bits equality 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(Object another)
      This instance is equal to all instances of VolumeSizeD 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, sizeZ.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static VolumeSizeD of(double sizeX, double sizeY, double sizeZ)
      Construct a new immutable VolumeSizeD 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 VolumeSizeD instance
    • copyOf

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

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