Class PAreaSizeL<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PAreaSizeL<S>
- Type Parameters:
S- A phantom type parameter indicating the coordinate space of the area
- All Implemented Interfaces:
PAreaSizeLType<S>,AreaSizeValuesLType
The size of an area with
long coordinates.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PAreaSizeL.Builder<S>builder()Creates a builder forPAreaSizeL.static <S> PAreaSizeL<S>copyOf(PAreaSizeLType<S> instance) Creates an immutable copy of aPAreaSizeLTypevalue.booleanThis instance is equal to all instances ofPAreaSizeLthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.longheight()Deprecated.static <S> PAreaSizeL<S>of(long sizeX, long sizeY) Construct a new immutablePAreaSizeLinstance.longsizeX()longsizeY()toString()Prints the immutable valuePAreaSizeLwith attribute values.longwidth()Deprecated.UsesizeX()final PAreaSizeL<S>withSizeX(long value) Copy the current immutable object by setting a value for thesizeXattribute.final PAreaSizeL<S>withSizeY(long value) Copy the current immutable object by setting a value for thesizeYattribute.
-
Method Details
-
width
Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesLType- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesLType- Returns:
- The height of the area
-
sizeX
public long sizeX()- Specified by:
sizeXin interfaceAreaSizeValuesLType- Specified by:
sizeXin interfacePAreaSizeLType<S>- Returns:
- The value of the
sizeXattribute
-
sizeY
public long sizeY()- Specified by:
sizeYin interfaceAreaSizeValuesLType- Specified by:
sizeYin interfacePAreaSizeLType<S>- Returns:
- The value of the
sizeYattribute
-
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
-
equals
This instance is equal to all instances ofPAreaSizeLthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY. -
toString
Prints the immutable valuePAreaSizeLwith attribute values. -
of
Construct a new immutablePAreaSizeLinstance.- Type Parameters:
S- generic parameter S- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattribute- Returns:
- An immutable PAreaSizeL instance
-
copyOf
Creates an immutable copy of aPAreaSizeLTypevalue. 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 PAreaSizeL instance
-
builder
Creates a builder forPAreaSizeL.PAreaSizeL.<S>builder() .setSizeX(long) // requiredsizeX.setSizeY(long) // requiredsizeY.build();- Type Parameters:
S- generic parameter S- Returns:
- A new PAreaSizeL builder
-
sizeY()