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