Class AreaSizeD
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeD
- All Implemented Interfaces:
AreaSizeDType
,AreaSizeValuesDType
The size of an area with
double
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeD.Builder
builder()
Creates a builder forAreaSizeD
.static AreaSizeD
copyOf
(AreaSizeDType instance) Creates an immutable copy of aAreaSizeDType
value.boolean
This instance is equal to all instances ofAreaSizeD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.double
height()
Deprecated.static AreaSizeD
of
(double sizeX, double sizeY) Construct a new immutableAreaSizeD
instance.double
sizeX()
double
sizeY()
toString()
Prints the immutable valueAreaSizeD
with attribute values.double
width()
Deprecated.UsesizeX()
final AreaSizeD
withSizeX
(double value) Copy the current immutable object by setting a value for thesizeX
attribute.final AreaSizeD
withSizeY
(double value) Copy the current immutable object by setting a value for thesizeY
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.jregions.core.unparameterized.sizes.AreaSizeDType
checkPreconditions
-
Method Details
-
width
Deprecated.UsesizeX()
- Specified by:
width
in interfaceAreaSizeValuesDType
- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()
- Specified by:
height
in interfaceAreaSizeValuesDType
- Returns:
- The height of the area
-
sizeX
public double sizeX()- Specified by:
sizeX
in interfaceAreaSizeDType
- Specified by:
sizeX
in interfaceAreaSizeValuesDType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
public double sizeY()- Specified by:
sizeY
in interfaceAreaSizeDType
- Specified by:
sizeY
in interfaceAreaSizeValuesDType
- Returns:
- The value of the
sizeY
attribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeX
attribute. A value strict bits equality 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 strict bits equality 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 ofAreaSizeD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valueAreaSizeD
with attribute values. -
of
Construct a new immutableAreaSizeD
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable AreaSizeD instance
-
copyOf
Creates an immutable copy of aAreaSizeDType
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 AreaSizeD instance
-
builder
Creates a builder forAreaSizeD
.AreaSizeD.builder() .setSizeX(double) // required
sizeX
.setSizeY(double) // requiredsizeY
.build();- Returns:
- A new AreaSizeD builder
-
sizeY()