public final class Area extends Object implements Serializable
| Constructor and Description |
|---|
Area(double value,
AreaUnit unit)
Create an area with computation type
ComputationType.SPHERICAL. |
Area(double value,
AreaUnit unit,
ComputationType computationType)
Create an area.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Equals implementation.
|
ComputationType |
getComputationType()
Returns the computation type used to interpret geometry coordinates when
doing the area computations.
|
AreaUnit |
getUnit()
Get the unit of measure for this area.
|
double |
getValue()
Get the value of measure for this area.
|
double |
getValue(AreaUnit unit)
Return the length in the requested unit, converting if necessary.
|
int |
hashCode()
Hashcode implementation.
|
public Area(double value,
AreaUnit unit)
ComputationType.SPHERICAL.value - the value of measure for this area.unit - the unit of measure for this area.IllegalArgumentException - if the specified value is less than 0, unit is null or the specified computation type is null.public Area(double value,
AreaUnit unit,
ComputationType computationType)
value - the value of measure for this area.unit - the unit of measure for this area.computationType - the computation type.IllegalArgumentException - if the specified value is less than 0, unit is null or the specified computation type is null.public AreaUnit getUnit()
public double getValue()
Area.getUnit().public double getValue(AreaUnit unit)
unit - the desired unit.IllegalArgumentException - if the specified unit is null.public ComputationType getComputationType()
public boolean equals(Object o)