Class PAreaSizeBD<S>
java.lang.Object
com.io7m.jregions.core.parameterized.sizes.PAreaSizeBD<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the area
- All Implemented Interfaces:
PAreaSizeBDType<S>
,AreaSizeValuesBDType
The size of an area with
BigDecimal
coordinates.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PAreaSizeBD.Builder<S>
builder()
Creates a builder forPAreaSizeBD
.static <S> PAreaSizeBD<S>
copyOf
(PAreaSizeBDType<S> instance) Creates an immutable copy of aPAreaSizeBDType
value.boolean
This instance is equal to all instances ofPAreaSizeBD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:sizeX
,sizeY
.height()
Deprecated.static <S> PAreaSizeBD<S>
of
(BigDecimal sizeX, BigDecimal sizeY) Construct a new immutablePAreaSizeBD
instance.sizeX()
sizeY()
toString()
Prints the immutable valuePAreaSizeBD
with attribute values.width()
Deprecated.UsesizeX()
final PAreaSizeBD<S>
withSizeX
(BigDecimal value) Copy the current immutable object by setting a value for thesizeX
attribute.final PAreaSizeBD<S>
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.parameterized.sizes.PAreaSizeBDType
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 interfaceAreaSizeValuesBDType
- Specified by:
sizeX
in interfacePAreaSizeBDType<S>
- Returns:
- The value of the
sizeX
attribute
-
sizeY
- Specified by:
sizeY
in interfaceAreaSizeValuesBDType
- Specified by:
sizeY
in interfacePAreaSizeBDType<S>
- 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 ofPAreaSizeBD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:sizeX
,sizeY
. -
toString
Prints the immutable valuePAreaSizeBD
with attribute values. -
of
Construct a new immutablePAreaSizeBD
instance.- Type Parameters:
S
- generic parameter S- Parameters:
sizeX
- The value for thesizeX
attributesizeY
- The value for thesizeY
attribute- Returns:
- An immutable PAreaSizeBD instance
-
copyOf
Creates an immutable copy of aPAreaSizeBDType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
S
- generic parameter S- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable PAreaSizeBD instance
-
builder
Creates a builder forPAreaSizeBD
.PAreaSizeBD.<S>builder() .setSizeX(java.math.BigDecimal) // required
sizeX
.setSizeY(java.math.BigDecimal) // requiredsizeY
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PAreaSizeBD builder
-
sizeY()