Class AreaSizeL
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeL
- All Implemented Interfaces:
AreaSizeLType
,AreaSizeValuesLType
The size of an area with
long
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeL.Builder
builder()
Creates a builder forAreaSizeL
.static AreaSizeL
copyOf
(AreaSizeLType instance) Creates an immutable copy of aAreaSizeLType
value.boolean
This instance is equal to all instances ofAreaSizeL
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.long
height()
Deprecated.static AreaSizeL
of
(long sizeX, long sizeY) Construct a new immutableAreaSizeL
instance.long
sizeX()
long
sizeY()
toString()
Prints the immutable valueAreaSizeL
with attribute values.long
width()
Deprecated.UsesizeX()
final AreaSizeL
withSizeX
(long value) Copy the current immutable object by setting a value for thesizeX
attribute.final AreaSizeL
withSizeY
(long value) Copy the current immutable object by setting a value for thesizeY
attribute.
-
Method Details
-
width
Deprecated.UsesizeX()
- Specified by:
width
in interfaceAreaSizeValuesLType
- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()
- Specified by:
height
in interfaceAreaSizeValuesLType
- Returns:
- The height of the area
-
sizeX
public long sizeX()- Specified by:
sizeX
in interfaceAreaSizeLType
- Specified by:
sizeX
in interfaceAreaSizeValuesLType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
public long sizeY()- Specified by:
sizeY
in interfaceAreaSizeLType
- Specified by:
sizeY
in interfaceAreaSizeValuesLType
- Returns:
- The value of the
sizeY
attribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeX
attribute. 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
this
object
-
withSizeY
Copy the current immutable object by setting a value for thesizeY
attribute. 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
this
object
-
equals
This instance is equal to all instances ofAreaSizeL
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valueAreaSizeL
with attribute values. -
of
Construct a new immutableAreaSizeL
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable AreaSizeL instance
-
copyOf
Creates an immutable copy of aAreaSizeLType
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 AreaSizeL instance
-
builder
Creates a builder forAreaSizeL
.AreaSizeL.builder() .setSizeX(long) // required
sizeX
.setSizeY(long) // requiredsizeY
.build();- Returns:
- A new AreaSizeL builder
-
sizeY()