Class PVolumeSizeL<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PVolumeSizeL<S>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the volume
- All Implemented Interfaces:
PVolumeSizeLType<S>,VolumeSizeValuesLType
The size of a volume with
long coordinates.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PVolumeSizeL.Builder<S>builder()Creates a builder forPVolumeSizeL.static <S> PVolumeSizeL<S>copyOf(PVolumeSizeLType<S> instance) Creates an immutable copy of aPVolumeSizeLTypevalue.booleanThis instance is equal to all instances ofPVolumeSizeLthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ.static <S> PVolumeSizeL<S>of(long sizeX, long sizeY, long sizeZ) Construct a new immutablePVolumeSizeLinstance.longsizeX()longsizeY()longsizeZ()toString()Prints the immutable valuePVolumeSizeLwith attribute values.final PVolumeSizeL<S>withSizeX(long value) Copy the current immutable object by setting a value for thesizeXattribute.final PVolumeSizeL<S>withSizeY(long value) Copy the current immutable object by setting a value for thesizeYattribute.final PVolumeSizeL<S>withSizeZ(long value) Copy the current immutable object by setting a value for thesizeZattribute.
-
Method Details
-
sizeX
public long sizeX()- Specified by:
sizeXin interfacePVolumeSizeLType<S>- Specified by:
sizeXin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeXattribute
-
sizeY
public long sizeY()- Specified by:
sizeYin interfacePVolumeSizeLType<S>- Specified by:
sizeYin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeYattribute
-
sizeZ
public long sizeZ()- Specified by:
sizeZin interfacePVolumeSizeLType<S>- Specified by:
sizeZin interfaceVolumeSizeValuesLType- Returns:
- The value of the
sizeZattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. A value equality check is 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. A value equality check is 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. A value equality check is 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 ofPVolumeSizeLthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY,sizeZ. -
toString
Prints the immutable valuePVolumeSizeLwith attribute values. -
of
Construct a new immutablePVolumeSizeLinstance.- Type Parameters:
S- generic parameter S- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattributesizeZ- The value for thesizeZattribute- Returns:
- An immutable PVolumeSizeL instance
-
copyOf
Creates an immutable copy of aPVolumeSizeLTypevalue. 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 PVolumeSizeL instance
-
builder
Creates a builder forPVolumeSizeL.PVolumeSizeL.<S>builder() .setSizeX(long) // requiredsizeX.setSizeY(long) // requiredsizeY.setSizeZ(long) // requiredsizeZ.build();- Type Parameters:
S- generic parameter S- Returns:
- A new PVolumeSizeL builder
-