Class PAreaD<S>
java.lang.Object
com.io7m.jregions.core.parameterized.areas.PAreaD<S>
- Type Parameters:
S
- A phantom type parameter indicating the coordinate space of the area
- All Implemented Interfaces:
PAreaDType<S>
,AreaValuesDType
,AreaSizeValuesDType
An area with double
coordinates.
The coordinates of the area are given in half-closed form. That is,
minimumX()
refers to the minimum inclusive value on the X
axis, and maximumX()
refers to the maximum exclusive value on
the X axis. Likewise for the Y axis.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <S> PAreaD.Builder<S>
builder()
Creates a builder forPAreaD
.static <S> PAreaD<S>
copyOf
(PAreaDType<S> instance) Creates an immutable copy of aPAreaDType
value.boolean
This instance is equal to all instances ofPAreaD
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
.double
height()
Deprecated.double
maximumX()
double
maximumY()
double
minimumX()
double
minimumY()
static <S> PAreaD<S>
of
(double minimumX, double maximumX, double minimumY, double maximumY) Construct a new immutablePAreaD
instance.toString()
Prints the immutable valuePAreaD
with attribute values.double
width()
Deprecated.withMaximumX
(double value) Copy the current immutable object by setting a value for themaximumX
attribute.withMaximumY
(double value) Copy the current immutable object by setting a value for themaximumY
attribute.withMinimumX
(double value) Copy the current immutable object by setting a value for theminimumX
attribute.withMinimumY
(double value) Copy the current immutable object by setting a value for theminimumY
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.areas.AreaValuesDType
sizeX, sizeY
Methods inherited from interface com.io7m.jregions.core.parameterized.areas.PAreaDType
checkPreconditions
-
Method Details
-
width
Deprecated.- Specified by:
width
in interfaceAreaSizeValuesDType
- Returns:
- The width of the area
-
height
Deprecated.- Specified by:
height
in interfaceAreaSizeValuesDType
- Returns:
- The height of the area
-
minimumX
public double minimumX()- Specified by:
minimumX
in interfaceAreaValuesDType
- Specified by:
minimumX
in interfacePAreaDType<S>
- Returns:
- The value of the
minimumX
attribute
-
maximumX
public double maximumX()- Specified by:
maximumX
in interfaceAreaValuesDType
- Specified by:
maximumX
in interfacePAreaDType<S>
- Returns:
- The value of the
maximumX
attribute
-
minimumY
public double minimumY()- Specified by:
minimumY
in interfaceAreaValuesDType
- Specified by:
minimumY
in interfacePAreaDType<S>
- Returns:
- The value of the
minimumY
attribute
-
maximumY
public double maximumY()- Specified by:
maximumY
in interfaceAreaValuesDType
- Specified by:
maximumY
in interfacePAreaDType<S>
- Returns:
- The value of the
maximumY
attribute
-
withMinimumX
Copy the current immutable object by setting a value for theminimumX
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumX- Returns:
- A modified copy of the
this
object
-
withMaximumX
Copy the current immutable object by setting a value for themaximumX
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumX- Returns:
- A modified copy of the
this
object
-
withMinimumY
Copy the current immutable object by setting a value for theminimumY
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for minimumY- Returns:
- A modified copy of the
this
object
-
withMaximumY
Copy the current immutable object by setting a value for themaximumY
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for maximumY- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofPAreaD
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:minimumX
,maximumX
,minimumY
,maximumY
. -
toString
Prints the immutable valuePAreaD
with attribute values. -
of
Construct a new immutablePAreaD
instance.- Type Parameters:
S
- generic parameter S- Parameters:
minimumX
- The value for theminimumX
attributemaximumX
- The value for themaximumX
attributeminimumY
- The value for theminimumY
attributemaximumY
- The value for themaximumY
attribute- Returns:
- An immutable PAreaD instance
-
copyOf
Creates an immutable copy of aPAreaDType
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 PAreaD instance
-
builder
Creates a builder forPAreaD
.PAreaD.<S>builder() .setMinimumX(double) // required
minimumX
.setMaximumX(double) // requiredmaximumX
.setMinimumY(double) // requiredminimumY
.setMaximumY(double) // requiredmaximumY
.build();- Type Parameters:
S
- generic parameter S- Returns:
- A new PAreaD builder
-
AreaValuesDType.sizeY()