Class PVolumeSizeBI<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PVolumeSizeBI<S>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeSizeBIType<S>,VolumeSizeValuesBIType
The size of a volume with
BigInteger coordinates.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PVolumeSizeBI.Builder<S>builder()Creates a builder forPVolumeSizeBI.static <S> PVolumeSizeBI<S>copyOf(PVolumeSizeBIType<S> instance) Creates an immutable copy of aPVolumeSizeBITypevalue.booleanThis instance is equal to all instances ofPVolumeSizeBIthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static <S> PVolumeSizeBI<S>of(BigInteger sizeX, BigInteger sizeY, BigInteger sizeZ) Construct a new immutablePVolumeSizeBIinstance.sizeX()sizeY()sizeZ()toString()Prints the immutable valuePVolumeSizeBIwith attribute values.final PVolumeSizeBI<S>withSizeX(BigInteger value) Copy the current immutable object by setting a value for thesizeXattribute.final PVolumeSizeBI<S>withSizeY(BigInteger value) Copy the current immutable object by setting a value for thesizeYattribute.final PVolumeSizeBI<S>withSizeZ(BigInteger value) Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
- Specified by:
sizeXin interfacePVolumeSizeBIType<S>- Specified by:
sizeXin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeXattribute
-
sizeY
- Specified by:
sizeYin interfacePVolumeSizeBIType<S>- Specified by:
sizeYin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeYattribute
-
sizeZ
- Specified by:
sizeZin interfacePVolumeSizeBIType<S>- Specified by:
sizeZin interfaceVolumeSizeValuesBIType- Returns:
- The value of the
sizeZattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sizeX- Returns:
- A modified copy of the
thisobject
-
withSizeY
Copy the current immutable object by setting a value for thesizeYattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sizeY- Returns:
- A modified copy of the
thisobject
-
withSizeZ
Copy the current immutable object by setting a value for thesizeZattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sizeZ- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofPVolumeSizeBIthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ. -
toString
Prints the immutable valuePVolumeSizeBIwith attribute values. -
of
Construct a new immutablePVolumeSizeBIinstance.- Type Parameters:
S- generic parameter S- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable PVolumeSizeBI instance
-
copyOf
Creates an immutable copy of aPVolumeSizeBITypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
S- generic parameter S- Parameters:
instance- The instance to copy- Returns:
- A copied immutable PVolumeSizeBI instance
-
builder
Creates a builder forPVolumeSizeBI.PVolumeSizeBI.<S>builder() .setSizeX(java.math.BigInteger) // requiredsizeX.setSizeY(java.math.BigInteger) // requiredsizeY.setSizeZ(java.math.BigInteger) // requiredsizeZ.build();- Type Parameters:
S- generic parameter S- Returns:
- A new PVolumeSizeBI builder
-