|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.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 | |
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 |
COMPLETE, DEVOID, SPATIALLYINTERPOLATED, TEMPORALLYINTERPOLATED, 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). |
double |
getValue(int unit)
Gets the frequency in the specified unit. |
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, isSpatiallyInterpolated, isTemporallyInterpolated, multiply, toComposite, toString |
| Methods inherited from class java.lang.Object |
equals, 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
| 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),
Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||