Class AreaSizeL
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeL
- All Implemented Interfaces:
AreaSizeLType,AreaSizeValuesLType
public final class AreaSizeL extends java.lang.Object implements AreaSizeLType
The size of an area with
long coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAreaSizeL.BuilderBuilds instances of typeAreaSizeL. -
Method Summary
Modifier and Type Method Description static AreaSizeL.Builderbuilder()Creates a builder forAreaSizeL.static AreaSizeLcopyOf(AreaSizeLType instance)Creates an immutable copy of aAreaSizeLTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofAreaSizeLthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.longheight()Deprecated.UsesizeY()static AreaSizeLof(long sizeX, long sizeY)Construct a new immutableAreaSizeLinstance.longsizeX()longsizeY()java.lang.StringtoString()Prints the immutable valueAreaSizeLwith attribute values.longwidth()Deprecated.UsesizeX()AreaSizeLwithSizeX(long value)Copy the current immutable object by setting a value for thesizeXattribute.AreaSizeLwithSizeY(long value)Copy the current immutable object by setting a value for thesizeYattribute.
-
Method Details
-
width
@Deprecated public long width()Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesLType- Returns:
- The width of the area
-
height
@Deprecated public long height()Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesLType- Returns:
- The height of the area
-
sizeX
public long sizeX()- Specified by:
sizeXin interfaceAreaSizeLType- Specified by:
sizeXin interfaceAreaSizeValuesLType- Returns:
- The value of the
sizeXattribute
-
sizeY
public long sizeY()- Specified by:
sizeYin interfaceAreaSizeLType- Specified by:
sizeYin interfaceAreaSizeValuesLType- 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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofAreaSizeLthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueAreaSizeLwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableAreaSizeLinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattribute- Returns:
- An immutable AreaSizeL instance
-
copyOf
Creates an immutable copy of aAreaSizeLTypevalue. 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) // requiredsizeX.setSizeY(long) // requiredsizeY.build();- Returns:
- A new AreaSizeL builder
-