|
||||||||||
| 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.VolumetricDensity
This class represents a mass per unit volume of a substance under specified conditions of pressure and temperature
Mass,
Volume,
Serialized Form| Field Summary | |
protected static double[] |
factors
Conversion table. |
static int |
GRAINS_PER_GALLON_UK
Used to specify grains per gallon unit (UK). |
static int |
GRAINS_PER_GALLON_US
Used to specify grains per gallon unit (US). |
static int |
GRAMS_PER_CUBIC_CENTIMETER
Used to specify grams per cubic centimeter unit. |
static int |
GRAMS_PER_CUBIC_CENTIMETRE
|
static int |
GRAMS_PER_LITER
Used to specify grams per liter. |
static int |
GRAMS_PER_LITRE
|
static int |
GRAMS_PER_MILLILITER
Used to specify grams per milliliter. |
static int |
GRAMS_PER_MILLILITRE
|
static int |
KILOGRAMS_PER_CUBIC_METER
Used to specify kilogram per cubic meter unit. |
static int |
KILOGRAMS_PER_CUBIC_METRE
|
static int |
KILOGRAMS_PER_LITER
Used to specify kilograms per liter. |
static int |
KILOGRAMS_PER_LITRE
|
static int |
MEGAGRAMS_PER_CUBIC_METER
Used to specify megagrams per cubic meter. |
static int |
MEGAGRAMS_PER_CUBIC_METRE
|
static int |
MILLIGRAMS_PER_LITER
Used to specify milligrams per liter. |
static int |
MILLIGRAMS_PER_LITRE
|
static int |
MILLIGRAMS_PER_MILLILITER
Used to specify milligrams per milliliter. |
static int |
MILLIGRAMS_PER_MILLILITRE
|
static int |
OUNCES_PER_CUBIC_INCH
Used to specify ounces per cubic inch. |
static int |
OUNCES_PER_GALLON_UK
Used to specify ounces per gallon (UK). |
static int |
OUNCES_PER_GALLON_US
Used to specify ounces per gallon (US). |
static int |
POUNDS_PER_CUBIC_FOOT
Used to specify pounds per cubic foot. |
static int |
POUNDS_PER_CUBIC_INCH
Used to specify pounds per cubic inch. |
static int |
POUNDS_PER_GALLON_UK
Used to specify pounds per gallon (UK). |
static int |
POUNDS_PER_GALLON_US
Used to specify pounds per gallon (US). |
static int |
TONNES_PER_CUBIC_METER
Used to specify tonnes per cubic meter. |
static int |
TONNES_PER_CUBIC_METRE
|
static int |
TONS_PER_CUBIC_YARD_UK
Used to specify tons per cubic yard (UK). |
static int |
TONS_PER_CUBIC_YARD_US
Used to specify tons per cubic yard (US). |
| 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 | |
VolumetricDensity(Composite c)
VolumetricDensity constructor from Composite quantity. |
|
VolumetricDensity(double value,
int unit)
VolumetricDensity constructor. |
|
| Method Summary | |
VolumetricDensity |
add(VolumetricDensity x)
Returns a VolumetricDensity whose value is (this + x). |
int |
compareTo(Object o)
Compares this VolumetricDensity with the specified Object. |
int |
compareTo(VolumetricDensity x)
Compares this VolumetricDensity with the specified VolumetricDensity. |
VolumetricDensity |
divide(double coefficient)
Returns a VolumetricDensity whose value is (this / coefficient). |
protected int |
getDimensionSI()
Gets the SI dimension of this VolumetricDensity. |
double |
getValue(int unit)
Gets the volumetric density in the specified unit. |
protected double |
getValueSI()
Gets the volumetric density in SI units. |
VolumetricDensity |
multiply(double coefficient)
Returns a VolumetricDensity whose value is (this * coefficient). |
Mass |
multiply(Volume v)
Returns a Mass whose value is (this * v). |
void |
setValue(double value,
int unit)
Sets this VolumetricDensity using the specified unit. |
VolumetricDensity |
substract(VolumetricDensity x)
Returns a VolumetricDensity 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 KILOGRAMS_PER_CUBIC_METER
public static final int KILOGRAMS_PER_CUBIC_METRE
public static final int GRAINS_PER_GALLON_UK
public static final int GRAINS_PER_GALLON_US
public static final int GRAMS_PER_CUBIC_CENTIMETER
public static final int GRAMS_PER_CUBIC_CENTIMETRE
public static final int GRAMS_PER_LITER
public static final int GRAMS_PER_LITRE
public static final int GRAMS_PER_MILLILITER
public static final int GRAMS_PER_MILLILITRE
public static final int MEGAGRAMS_PER_CUBIC_METER
public static final int MEGAGRAMS_PER_CUBIC_METRE
public static final int MILLIGRAMS_PER_MILLILITER
public static final int MILLIGRAMS_PER_MILLILITRE
public static final int MILLIGRAMS_PER_LITER
public static final int MILLIGRAMS_PER_LITRE
public static final int KILOGRAMS_PER_LITER
public static final int KILOGRAMS_PER_LITRE
public static final int OUNCES_PER_CUBIC_INCH
public static final int OUNCES_PER_GALLON_UK
public static final int OUNCES_PER_GALLON_US
public static final int POUNDS_PER_CUBIC_INCH
public static final int POUNDS_PER_CUBIC_FOOT
public static final int POUNDS_PER_GALLON_UK
public static final int POUNDS_PER_GALLON_US
public static final int TONNES_PER_CUBIC_METER
public static final int TONNES_PER_CUBIC_METRE
public static final int TONS_PER_CUBIC_YARD_UK
public static final int TONS_PER_CUBIC_YARD_US
protected static final double[] factors
| Constructor Detail |
public VolumetricDensity(double value,
int unit)
value - the volumetric density in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic VolumetricDensity(Composite c)
c - the quantity to convert.
UnitDimensionException - composite is not a volumetric density.Composite| 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 volumetric density in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic VolumetricDensity add(VolumetricDensity x)
x - the VolumetricDensity to be added.
public VolumetricDensity substract(VolumetricDensity x)
x - the VolumetricDensity to be substracted.
public VolumetricDensity multiply(double coefficient)
coefficient - the dimensionless multiplier.
public VolumetricDensity divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public Mass multiply(Volume v)
v - the volume multiplier.
public int compareTo(VolumetricDensity x)
x - VolumetricDensity to which this VolumetricDensity is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this VolumetricDensity is to be compared.
ClassCastException - o is not a VolumetricDensity.compareTo(VolumetricDensity),
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 | |||||||||