java.lang.Object
com.io7m.jregions.core.unparameterized.volumes.VolumeBI
All Implemented Interfaces:
VolumeSizeValuesBIType, VolumeBIType, VolumeValuesBIType

public final class VolumeBI
extends java.lang.Object
implements VolumeBIType

A volume with BigInteger coordinates.

The coordinates of the area are given in half-closed form. That is, minimumX() refers to the minimum inclusive value on the X axis, and maximumX() refers to the maximum exclusive value on the X axis. Likewise for the Y and Z axes.

  • Nested Class Summary

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

    Modifier and Type Method Description
    static VolumeBI.Builder builder()
    Creates a builder for VolumeBI.
    static VolumeBI copyOf​(VolumeBIType instance)
    Creates an immutable copy of a VolumeBIType value.
    boolean equals​(java.lang.Object another)
    This instance is equal to all instances of VolumeBI that have equal attribute values.
    int hashCode()
    Computes a hash code from attributes: minimumX, maximumX, minimumY, maximumY, minimumZ, maximumZ.
    java.math.BigInteger maximumX()  
    java.math.BigInteger maximumY()  
    java.math.BigInteger maximumZ()  
    java.math.BigInteger minimumX()  
    java.math.BigInteger minimumY()  
    java.math.BigInteger minimumZ()  
    static VolumeBI of​(java.math.BigInteger minimumX, java.math.BigInteger maximumX, java.math.BigInteger minimumY, java.math.BigInteger maximumY, java.math.BigInteger minimumZ, java.math.BigInteger maximumZ)
    Construct a new immutable VolumeBI instance.
    java.lang.String toString()
    Prints the immutable value VolumeBI with attribute values.
    VolumeBI withMaximumX​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the maximumX attribute.
    VolumeBI withMaximumY​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the maximumY attribute.
    VolumeBI withMaximumZ​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the maximumZ attribute.
    VolumeBI withMinimumX​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the minimumX attribute.
    VolumeBI withMinimumY​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the minimumY attribute.
    VolumeBI withMinimumZ​(java.math.BigInteger value)
    Copy the current immutable object by setting a value for the minimumZ attribute.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeBIType

    checkPreconditions

    Methods inherited from interface com.io7m.jregions.core.unparameterized.volumes.VolumeValuesBIType

    sizeX, sizeY, sizeZ
  • Method Details

    • minimumX

      public java.math.BigInteger minimumX()
      Specified by:
      minimumX in interface VolumeBIType
      Specified by:
      minimumX in interface VolumeValuesBIType
      Returns:
      The value of the minimumX attribute
    • maximumX

      public java.math.BigInteger maximumX()
      Specified by:
      maximumX in interface VolumeBIType
      Specified by:
      maximumX in interface VolumeValuesBIType
      Returns:
      The value of the maximumX attribute
    • minimumY

      public java.math.BigInteger minimumY()
      Specified by:
      minimumY in interface VolumeBIType
      Specified by:
      minimumY in interface VolumeValuesBIType
      Returns:
      The value of the minimumY attribute
    • maximumY

      public java.math.BigInteger maximumY()
      Specified by:
      maximumY in interface VolumeBIType
      Specified by:
      maximumY in interface VolumeValuesBIType
      Returns:
      The value of the maximumY attribute
    • minimumZ

      public java.math.BigInteger minimumZ()
      Specified by:
      minimumZ in interface VolumeBIType
      Specified by:
      minimumZ in interface VolumeValuesBIType
      Returns:
      The value of the minimumZ attribute
    • maximumZ

      public java.math.BigInteger maximumZ()
      Specified by:
      maximumZ in interface VolumeBIType
      Specified by:
      maximumZ in interface VolumeValuesBIType
      Returns:
      The value of the maximumZ attribute
    • withMinimumX

      public final VolumeBI withMinimumX​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the minimumX attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumX
      Returns:
      A modified copy of the this object
    • withMaximumX

      public final VolumeBI withMaximumX​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the maximumX attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumX
      Returns:
      A modified copy of the this object
    • withMinimumY

      public final VolumeBI withMinimumY​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the minimumY attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumY
      Returns:
      A modified copy of the this object
    • withMaximumY

      public final VolumeBI withMaximumY​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the maximumY attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumY
      Returns:
      A modified copy of the this object
    • withMinimumZ

      public final VolumeBI withMinimumZ​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the minimumZ attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for minimumZ
      Returns:
      A modified copy of the this object
    • withMaximumZ

      public final VolumeBI withMaximumZ​(java.math.BigInteger value)
      Copy the current immutable object by setting a value for the maximumZ attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maximumZ
      Returns:
      A modified copy of the this object
    • equals

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

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

      public static VolumeBI of​(java.math.BigInteger minimumX, java.math.BigInteger maximumX, java.math.BigInteger minimumY, java.math.BigInteger maximumY, java.math.BigInteger minimumZ, java.math.BigInteger maximumZ)
      Construct a new immutable VolumeBI instance.
      Parameters:
      minimumX - The value for the minimumX attribute
      maximumX - The value for the maximumX attribute
      minimumY - The value for the minimumY attribute
      maximumY - The value for the maximumY attribute
      minimumZ - The value for the minimumZ attribute
      maximumZ - The value for the maximumZ attribute
      Returns:
      An immutable VolumeBI instance
    • copyOf

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

      public static VolumeBI.Builder builder()
      Creates a builder for VolumeBI.
       VolumeBI.builder()
          .setMinimumX(java.math.BigInteger) // required minimumX
          .setMaximumX(java.math.BigInteger) // required maximumX
          .setMinimumY(java.math.BigInteger) // required minimumY
          .setMaximumY(java.math.BigInteger) // required maximumY
          .setMinimumZ(java.math.BigInteger) // required minimumZ
          .setMaximumZ(java.math.BigInteger) // required maximumZ
          .build();
       
      Returns:
      A new VolumeBI builder