|
||||||||||
| 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.Frequency
This class represents the number of times a specified phenomenon occurs within a specified interval.
Duration,
Serialized Form| Field Summary | |
protected static double[] |
factors
Conversion table. |
static int |
GIGAHERTZ
Used to specify kilohertz unit. |
static int |
HERTZ
Used to specify hertz unit. |
static int |
KILOHERTZ
Used to specify kilohertz unit. |
static int |
MEGAHERTZ
Used to specify kilohertz unit. |
static int |
TERAHERTZ
Used to specify terahertz 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 | |
Frequency(Composite c)
Frequency constructor from Composite quantity. |
|
Frequency(double value,
int unit)
Frequency constructor. |
|
| Method Summary | |
Frequency |
add(Frequency x)
Returns a Frequency whose value is (this + x). |
int |
compareTo(Frequency x)
Compares this Frequency with the specified Frequency. |
int |
compareTo(Object o)
Compares this Frequency with the specified Object. |
Frequency |
divide(double coefficient)
Returns a Frequency whose value is (this / coefficient). |
protected int |
getDimensionSI()
Gets the SI dimension of this Frequency. |
double |
getValue(int unit)
Gets the frequency in the specified unit. |
protected double |
getValueSI()
Gets the frequency in SI units. |
Duration |
inverse()
Returns the Duration period corresponding to this frequency. |
Frequency |
multiply(double coefficient)
Returns a Frequency whose value is (this * coefficient). |
void |
setValue(double value,
int unit)
Sets this Frequency using the specified unit. |
Frequency |
substract(Frequency x)
Returns a Frequency 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 HERTZ
public static final int KILOHERTZ
public static final int MEGAHERTZ
public static final int GIGAHERTZ
public static final int TERAHERTZ
protected static final double[] factors
| Constructor Detail |
public Frequency(double value,
int unit)
value - the frequency in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Frequency(Composite c)
c - the quantity to convert.
UnitDimensionException - composite is not a frequency.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 frequency in the specified unit.unit - the measurement unit being used.
ArrayIndexOutOfBoundsException - unknown measurement unitpublic Frequency add(Frequency x)
x - the Frequency to be added.
public Frequency substract(Frequency x)
x - the Frequency to be substracted.
public Frequency multiply(double coefficient)
coefficient - the dimensionless multiplier.
public Frequency divide(double coefficient)
coefficient - the dimensionless divisor.
ArithmeticException - coefficient == 0.0public Duration inverse()
ArithmeticException - this == 0.0 Hertzpublic int compareTo(Frequency x)
x - Frequency to which this Frequency is to be compared.
public int compareTo(Object o)
compareTo in interface Comparableo - Object to which this Frequency is to be compared.
ClassCastException - o is not a Frequency.compareTo(Frequency),
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 | |||||||||