Class VolumeSizeBD

java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.VolumeSizeBD
All Implemented Interfaces:
VolumeSizeBDType, VolumeSizeValuesBDType

public final class VolumeSizeBD
extends java.lang.Object
implements VolumeSizeBDType
The size of a volume with BigDecimal coordinates.
  • Nested Class Summary

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

    Modifier and Type Method Description
    static VolumeSizeBD.Builder builder()
    Creates a builder for VolumeSizeBD.
    static VolumeSizeBD copyOf​(VolumeSizeBDType instance)
    Creates an immutable copy of a VolumeSizeBDType value.
    boolean equals​(java.lang.Object another)
    This instance is equal to all instances of VolumeSizeBD that have equal attribute values.
    int hashCode()
    Computes a hash code from attributes: sizeX, sizeY, sizeZ.
    static VolumeSizeBD of​(java.math.BigDecimal sizeX, java.math.BigDecimal sizeY, java.math.BigDecimal sizeZ)
    Construct a new immutable VolumeSizeBD instance.
    java.math.BigDecimal sizeX()  
    java.math.BigDecimal sizeY()  
    java.math.BigDecimal sizeZ()  
    java.lang.String toString()
    Prints the immutable value VolumeSizeBD with attribute values.
    VolumeSizeBD withSizeX​(java.math.BigDecimal value)
    Copy the current immutable object by setting a value for the sizeX attribute.
    VolumeSizeBD withSizeY​(java.math.BigDecimal value)
    Copy the current immutable object by setting a value for the sizeY attribute.
    VolumeSizeBD withSizeZ​(java.math.BigDecimal 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 java.math.BigDecimal sizeX()
      Specified by:
      sizeX in interface VolumeSizeBDType
      Specified by:
      sizeX in interface VolumeSizeValuesBDType
      Returns:
      The value of the sizeX attribute
    • sizeY

      public java.math.BigDecimal sizeY()
      Specified by:
      sizeY in interface VolumeSizeBDType
      Specified by:
      sizeY in interface VolumeSizeValuesBDType
      Returns:
      The value of the sizeY attribute
    • sizeZ

      public java.math.BigDecimal sizeZ()
      Specified by:
      sizeZ in interface VolumeSizeBDType
      Specified by:
      sizeZ in interface VolumeSizeValuesBDType
      Returns:
      The value of the sizeZ attribute
    • withSizeX

      public final VolumeSizeBD withSizeX​(java.math.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 VolumeSizeBD withSizeY​(java.math.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
    • withSizeZ

      public final VolumeSizeBD withSizeZ​(java.math.BigDecimal value)
      Copy the current immutable object by setting a value for the sizeZ attribute. An equals check 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 VolumeSizeBD 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 VolumeSizeBD with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • of

      public static VolumeSizeBD of​(java.math.BigDecimal sizeX, java.math.BigDecimal sizeY, java.math.BigDecimal sizeZ)
      Construct a new immutable VolumeSizeBD 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 VolumeSizeBD instance
    • copyOf

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

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