|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.util.Range
public class Range
Holds a simple min/max range
| Field Summary | |
|---|---|
double |
max
The range |
double |
min
The range |
| Constructor Summary | |
|---|---|
Range()
Default ctor |
|
Range(double[] a)
ctor |
|
Range(double min,
double max)
Create a range with min, max |
|
Range(double min,
double max,
String name)
Create a range with min, max and name |
|
Range(Range r)
copy ctor |
|
| Method Summary | |
|---|---|
double[] |
asArray()
Get a 2-aray array holding min/max |
float[] |
asFloatArray()
Get a 2-aray array holding min/max |
boolean |
equals(Object o)
Equals |
String |
formatMax()
Format the max value |
String |
formatMid()
Format the mid value |
String |
formatMin()
Format the min value |
double |
getAbsSpan()
get abs(max-min) |
double |
getMax()
Get the max |
int |
getMaxInt()
Get int value of max |
double |
getMid()
Get the mid point |
int |
getMidInt()
Get the int value of mid point |
double |
getMin()
Get the min |
int |
getMinInt()
Get int value of min |
String |
getName()
Get the Name property. |
double |
getPercent(double v)
Ge tthe percent the given value is between min and max |
double |
getSpan()
max-min |
int |
getSpanInt()
Get the int value of the span (the difference between max and min) |
double |
getValueOfPercent(double percent)
Get percent along the way between min and max |
void |
set(double min,
double max)
set the values |
void |
setMax(double v)
Set the max |
void |
setMax(int v)
Set the max |
void |
setMin(double v)
Set the min |
void |
setMin(int v)
Set the min |
void |
setName(String value)
Set the Name property. |
double |
span()
max-min |
String |
toString()
to string |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double min
public double max
| Constructor Detail |
|---|
public Range()
public Range(double min,
double max)
min - minmax - max
public Range(double min,
double max,
String name)
min - minmax - maxname - namepublic Range(double[] a)
a - 2-ary array holding min/maxpublic Range(Range r)
r - object| Method Detail |
|---|
public boolean equals(Object o)
equals in class Objecto - Object
public void set(double min,
double max)
min - minmax - maxpublic String formatMin()
public String formatMid()
public String formatMax()
public double getMin()
public double getMax()
public void setMin(double v)
v - valuepublic void setMax(double v)
v - valuepublic int getSpanInt()
public int getMinInt()
public int getMaxInt()
public void setMin(int v)
v - valuepublic void setMax(int v)
v - valuepublic double[] asArray()
public float[] asFloatArray()
public double span()
public double getSpan()
public double getAbsSpan()
public double getMid()
public int getMidInt()
public double getValueOfPercent(double percent)
percent - percent
public double getPercent(double v)
v - value
public void setName(String value)
value - The new value for Namepublic String getName()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||