Class AreaSizeBD
java.lang.Object
com.io7m.jregions.core.unparameterized.sizes.AreaSizeBD
- All Implemented Interfaces:
AreaSizeBDType,AreaSizeValuesBDType
The size of an area with
BigDecimal coordinates.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeBD.Builderbuilder()Creates a builder forAreaSizeBD.static AreaSizeBDcopyOf(AreaSizeBDType instance) Creates an immutable copy of aAreaSizeBDTypevalue.booleanThis instance is equal to all instances ofAreaSizeBDthat have equal attribute values.inthashCode()Computes a hash code from attributes:sizeX,sizeY.height()Deprecated.static AreaSizeBDof(BigDecimal sizeX, BigDecimal sizeY) Construct a new immutableAreaSizeBDinstance.sizeX()sizeY()toString()Prints the immutable valueAreaSizeBDwith attribute values.width()Deprecated.UsesizeX()final AreaSizeBDwithSizeX(BigDecimal value) Copy the current immutable object by setting a value for thesizeXattribute.final AreaSizeBDwithSizeY(BigDecimal 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.AreaSizeBDType
checkPreconditions
-
Method Details
-
width
Deprecated.UsesizeX()- Specified by:
widthin interfaceAreaSizeValuesBDType- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()- Specified by:
heightin interfaceAreaSizeValuesBDType- Returns:
- The height of the area
-
sizeX
- Specified by:
sizeXin interfaceAreaSizeBDType- Specified by:
sizeXin interfaceAreaSizeValuesBDType- Returns:
- The value of the
sizeXattribute
-
sizeY
- Specified by:
sizeYin interfaceAreaSizeBDType- Specified by:
sizeYin interfaceAreaSizeValuesBDType- Returns:
- The value of the
sizeYattribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeXattribute. An equals check 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. An equals check 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 ofAreaSizeBDthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX,sizeY. -
toString
Prints the immutable valueAreaSizeBDwith attribute values. -
of
Construct a new immutableAreaSizeBDinstance.- Parameters:
sizeX- The value for thesizeXattributesizeY- The value for thesizeYattribute- Returns:
- An immutable AreaSizeBD instance
-
copyOf
Creates an immutable copy of aAreaSizeBDTypevalue. 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 AreaSizeBD instance
-
builder
Creates a builder forAreaSizeBD.AreaSizeBD.builder() .setSizeX(java.math.BigDecimal) // requiredsizeX.setSizeY(java.math.BigDecimal) // requiredsizeY.build();- Returns:
- A new AreaSizeBD builder
-
sizeY()