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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeF.Builderbuilder()Creates a builder forAreaSizeF.static AreaSizeFcopyOf(AreaSizeFType instance) Creates an immutable copy of aAreaSizeFTypevalue.booleanThis instance is equal to all instances ofAreaSizeFthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.floatheight()Deprecated.static AreaSizeFof(float sizeX, float sizeY) Construct a new immutableAreaSizeFinstance.floatsizeX()floatsizeY()toString()Prints the immutable valueAreaSizeFwith attribute values.floatwidth()Deprecated.UsesizeX()final AreaSizeFwithSizeX(float value) Copy the current immutable object by setting a value for thesizeXattribute.final AreaSizeFwithSizeY(float value) Copy the current immutable object by setting a value for thesizeYattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.jregions.core.unparameterized.sizes.AreaSizeFType
checkPreconditions
-
Method Details
-
width
Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesFType- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesFType- Returns:
- The height of the area
-
sizeX
public float sizeX()- Specified by:
sizeXin interfaceAreaSizeFType- Specified by:
sizeXin interfaceAreaSizeValuesFType- Returns:
- The value of the
sizeXattribute
-
sizeY
public float sizeY()- Specified by:
sizeYin interfaceAreaSizeFType- Specified by:
sizeYin interfaceAreaSizeValuesFType- Returns:
- The value of the
sizeYattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. 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
thisobject
-
withSizeY
Copy the current immutable object by setting a value for thesizeYattribute. 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
thisobject
-
equals
This instance is equal to all instances ofAreaSizeFthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY. -
toString
Prints the immutable valueAreaSizeFwith attribute values. -
of
Construct a new immutableAreaSizeFinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattribute- Returns:
- An immutable AreaSizeF instance
-
copyOf
Creates an immutable copy of aAreaSizeFTypevalue. 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) // requiredsizeX.setSizeY(float) // requiredsizeY.build();- Returns:
- A new AreaSizeF builder
-
sizeY()