Class AreaSizeF
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeF
- All Implemented Interfaces:
AreaSizeFType,AreaSizeValuesFType
public final class AreaSizeF extends java.lang.Object implements AreaSizeFType
The size of an area with
float coordinates.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAreaSizeF.BuilderBuilds instances of typeAreaSizeF. -
Method Summary
Modifier and Type Method Description static AreaSizeF.Builderbuilder()Creates a builder forAreaSizeF.static AreaSizeFcopyOf(AreaSizeFType instance)Creates an immutable copy of aAreaSizeFTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofAreaSizeFthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.floatheight()Deprecated.UsesizeY()static AreaSizeFof(float sizeX, float sizeY)Construct a new immutableAreaSizeFinstance.floatsizeX()floatsizeY()java.lang.StringtoString()Prints the immutable valueAreaSizeFwith attribute values.floatwidth()Deprecated.UsesizeX()AreaSizeFwithSizeX(float value)Copy the current immutable object by setting a value for thesizeXattribute.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 public float width()Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesFType- Returns:
- The width of the area
-
height
@Deprecated public float 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
public boolean equals(java.lang.Object another)This instance is equal to all instances ofAreaSizeFthat 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 valueAreaSizeFwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
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
-