|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuavsim.datatypes.FrequencyComponent
public class FrequencyComponent
Defines a component of frequency in terms of a value on interval. A component is the numerical value to the left or right of the decimal place in a frequency.
| Field Summary | |
|---|---|
private int |
_max
the maximum value |
private int |
_min
the minimum value |
private int |
_step
the step up or down |
private int |
_value
the value |
| Constructor Summary | |
|---|---|
FrequencyComponent(int value,
int min,
int max,
int step)
Creates a frequency component. |
|
| Method Summary | |
|---|---|
FrequencyComponent |
add_(FrequencyComponent value)
Adds another unit to this one. |
int |
compareTo(FrequencyComponent component)
|
java.lang.String |
formatString(int width)
Formats the component padded with zeros. |
double |
getMax()
Gets the maximum value. |
double |
getMin()
Gets the minimum value. |
double |
getStep()
Gets the step value. |
double |
getValue_()
Returns the numerical value of this unit. |
FrequencyComponent |
subtract_(FrequencyComponent value)
Subtract another unit from this one. |
java.lang.String |
toString()
|
private int |
wrap(int value)
Wraps the value back onto the interval if it is off it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final int _max
private final int _min
private final int _step
private final int _value
| Constructor Detail |
|---|
public FrequencyComponent(int value,
int min,
int max,
int step)
value - - the valuemin - - the minimum valuemax - - the maximum valuestep - - the step up or down| Method Detail |
|---|
public FrequencyComponent add_(FrequencyComponent value)
add_ in interface I_Unitable<FrequencyComponent>value - - the unit
public int compareTo(FrequencyComponent component)
compareTo in interface java.lang.Comparable<FrequencyComponent>public java.lang.String formatString(int width)
width - - the number of decimal places
public double getMax()
public double getMin()
public double getStep()
public double getValue_()
getValue_ in interface I_Unitable<FrequencyComponent>public FrequencyComponent subtract_(FrequencyComponent value)
subtract_ in interface I_Unitable<FrequencyComponent>value - - the unit
public java.lang.String toString()
toString in class java.lang.Objectprivate int wrap(int value)
value - - the value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||