|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.agmodel.physical.AbstractQuantity
|
+--net.agmodel.physical.Area
This class represents the extent of a planar region or of the surface of a solid measured in square units.
| Field Summary | |
static int |
ACRE
Used to specify acre unit. |
static int |
ARE
Used to specify are unit. |
static int |
CIRCULAR_INCH
Used to specify circular inch unit. |
protected static double[] |
factors
Conversion table. |
static int |
HECTARE
Used to specify hectare unit. |
static int |
MORGEN
Used to specify morgen unit (Dutch & South Africa). |
static int |
MOU
Used to specify mou unit (China). |
static int |
ROOD
Used to specify rood unit. |
static int |
SE
Used to specify se unit (Japan). |
static int |
SECTION
Used to specify section unit. |
static int |
SQUARE
Used to specify square (of timber) unit. |
static int |
SQUARE_CENTIMETER
Used to specify square centimeter unit. |
static int |
SQUARE_CENTIMETRE
|
static int |
SQUARE_FOOT
Used to specify square foot unit. |
static int |
SQUARE_INCH
Used to specify square inch unit. |
static int |
SQUARE_KILOMETER
Used to specify square kilometer unit. |
static int |
SQUARE_KILOMETRE
|
static int |
SQUARE_METER
Used to specify square meter unit. |
static int |
SQUARE_METRE
|
static int |
SQUARE_MILE
Used to specify square mile unit. |
static int |
SQUARE_MILLIMETER
Used to specify square millimeter unit. |
static int |
SQUARE_MILLIMETRE
|
static int |
SQUARE_POLE
Used to specify square pole unit (= square rod). |
static int |
SQUARE_ROD
Used to specify square rod unit. |
static int |
SQUARE_YARD
Used to specify square yard unit. |
static int |
TOWNSHIP
Used to specify township unit. |
| Fields inherited from class net.agmodel.physical.AbstractQuantity |
AMOUNT_OF_SUBSTANCE, COMPLETE, derivation, DEVOID, DIMENSIONLESS, ELECTRIC_CURRENT, LENGTH, LUMINOUS_INTENSITY, MASS, SPATIALLYINTERPOLATED, TEMPORALLYINTERPOLATED, THERMODYNAMIC_TEMPERATURE, TIME, UNINTERPOLATED |
| Constructor Summary | |
Area(Composite c)
Area constructor from Composite quantity. |
|
Area(double value,
int unit)
Area constructor. |
|
Area(Length radius,
Angle theta)
Area constructor from a Length and an Angle (slice of a circle). |
|
| Method Summary | |
Area |
add(Area x)
Returns an Area whose value is (this + x). |
int |
compareTo(Area x)
Compares this Area with the specified Area. |
int |
compareTo(Object o)
Compares this Area with the specified Object. |
Area |
divide(double coefficient)
Returns an Area whose value is (this / coefficient). |
Length |
divide(Length x)
Returns a Length whose value is (this / x). |
protected int |
getDimensionSI()
Gets the SI dimension of this Area. |
double |
getValue(int unit)
Gets the area in the specified unit. |
protected double |
getValueSI()
Gets the area in square meters. |
Area |
multiply(double coefficient)
Returns an Area whose value is (this * coefficient). |
Volume |
multiply(Length x)
Returns a Volume whose value is (this * x). |
void |
setValue(double value,
int unit)
Sets this Area using the specified unit. |
Area |
substract(Area x)
Returns an Area whose value is (this - x). |
| Methods inherited from class net.agmodel.physical.AbstractQuantity |
clone, divide, getSymbolSI, isSpatiallyInterpolated, isTemporallyInterpolated, multiply, toComposite, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int SQUARE_METER
public static final int SQUARE_METRE
public static final int SQUARE_FOOT
public static final int SQUARE_YARD
public static final int SQUARE_INCH
public static final int SQUARE_MILE
public static final int ACRE
public static final int HECTARE
public static final int ARE
public static final int ROOD
public static final int SQUARE_MILLIMETER
public static final int SQUARE_MILLIMETRE
public static final int SQUARE_CENTIMETER
public static final int SQUARE_CENTIMETRE
public static final int SQUARE_KILOMETER
public static final int SQUARE_KILOMETRE
public static final int SQUARE
public static final int SQUARE_ROD
public static final int SQUARE_POLE
public static final int CIRCULAR_INCH
public static final int TOWNSHIP
public static final int MORGEN
public static final int MOU
public static final int SE
public static final int SECTION
protected static final double[] factors
| Constructor Detail |
public Area(double value,
int unit)
value - the area in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Area(Composite c)
c - the quantity to convert.
UnitDimensionException - composite is not an area.Composite
public Area(Length radius,
Angle theta)
radius - the circle radius.theta - the central angle.| Method Detail |
public double getValue(int unit)
unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unit
public void setValue(double value,
int unit)
value - the new area in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Area add(Area x)
x - the Area to be added.
public Area substract(Area x)
x - the Area to be substracted.
public Area multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Volume multiply(Length x)
x - the Length multiplier.
public Area divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public Length divide(Length x)
x - the Length divisor.
ArithmeticException - x.getValue(METER) == 0.0public int compareTo(Area x)
x - Area to which this Area is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Area is to be compared.
ClassCastException - o is not a Area.compareTo(Area),
Comparableprotected double getValueSI()
getValueSI in class AbstractQuantityprotected int getDimensionSI()
getDimensionSI in class AbstractQuantity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||