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
-
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSizeBD.Builder
builder()
Creates a builder forAreaSizeBD
.static AreaSizeBD
copyOf
(AreaSizeBDType instance) Creates an immutable copy of aAreaSizeBDType
value.boolean
This instance is equal to all instances ofAreaSizeBD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.height()
Deprecated.static AreaSizeBD
of
(BigDecimal sizeX, BigDecimal sizeY) Construct a new immutableAreaSizeBD
instance.sizeX()
sizeY()
toString()
Prints the immutable valueAreaSizeBD
with attribute values.width()
Deprecated.UsesizeX()
final AreaSizeBD
withSizeX
(BigDecimal value) Copy the current immutable object by setting a value for thesizeX
attribute.final AreaSizeBD
withSizeY
(BigDecimal 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.AreaSizeBDType
checkPreconditions
-
Method Details
-
width
Deprecated.UsesizeX()
- Specified by:
width
in interfaceAreaSizeValuesBDType
- Returns:
- The width of the area
-
height
Deprecated.UsesizeY()
- Specified by:
height
in interfaceAreaSizeValuesBDType
- Returns:
- The height of the area
-
sizeX
- Specified by:
sizeX
in interfaceAreaSizeBDType
- Specified by:
sizeX
in interfaceAreaSizeValuesBDType
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceAreaSizeBDType
- Specified by:
sizeY
in interfaceAreaSizeValuesBDType
- Returns:
- The value of the
sizeY
attribute
-
withSizeX
Copy the current immutable object by setting a value for thesizeX
attribute. 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
this
object
-
withSizeY
Copy the current immutable object by setting a value for thesizeY
attribute. 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
this
object
-
equals
This instance is equal to all instances ofAreaSizeBD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valueAreaSizeBD
with attribute values. -
of
Construct a new immutableAreaSizeBD
instance.- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable AreaSizeBD instance
-
copyOf
Creates an immutable copy of aAreaSizeBDType
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 AreaSizeBD instance
-
builder
Creates a builder forAreaSizeBD
.AreaSizeBD.builder() .setSizeX(java.math.BigDecimal) // required
sizeX
.setSizeY(java.math.BigDecimal) // requiredsizeY
.build();- Returns:
- A new AreaSizeBD builder
-
sizeY()