|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.util.Nodata
cds.util.FloatPrec
Float number with precision
Field Summary | |
private float |
nb
|
private static FloatPrec |
NODATA_FP
|
private static java.lang.String |
NODATA_STR
|
private short |
prec
|
Fields inherited from class cds.util.Nodata |
NODATA, NODATA_DBL, NODATA_FLT, NODATA_SHT |
Constructor Summary | |
FloatPrec()
Empty constructor. |
|
FloatPrec(FloatPrec fp)
Copy constructor |
|
FloatPrec(float nb,
short prec)
Constructor with parameters |
|
FloatPrec(java.lang.String nb)
Constructor initializing a FloatPrec number with a string |
Method Summary | |
private short |
calculatePrec(java.lang.String nb)
Computes the precision (number of decimal digits) |
boolean |
equals(java.lang.Object o)
MOD-BB 21-01-04 Ajout de cette methode. |
float |
getFloat()
Returns the floating point value |
short |
getPrec()
Returns the precision value |
void |
set(FloatPrec fp)
Sets the FloatPrec object from another one |
void |
set(java.lang.String nb)
Sets the FloatPrec number value from a string |
void |
setPrec(short prec)
Sets the precision |
java.lang.String |
toString()
Display the number in a string |
java.lang.String |
toString(boolean signed)
Display the FloatPrec number |
java.lang.String |
toString(short precision,
boolean signed)
Display the FloatPrec number with a defined precision. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final FloatPrec NODATA_FP
private static final java.lang.String NODATA_STR
private float nb
private short prec
Constructor Detail |
public FloatPrec()
public FloatPrec(java.lang.String nb)
nb
- decimal number in a stringpublic FloatPrec(FloatPrec fp)
fp
- FloatPrec numberpublic FloatPrec(float nb, short prec)
nb
- floating point number (value)prec
- precision (number of decimal digits)Method Detail |
public void set(FloatPrec fp)
fp
- FloatPrec object to copypublic void set(java.lang.String nb)
nb
- decimal number as a stringpublic void setPrec(short prec)
prec
- precision (O: no dec, 1: 1 dec, ...)private short calculatePrec(java.lang.String nb)
nb
- number (string) from which the precision should be computed
public float getFloat()
public short getPrec()
public java.lang.String toString()
public java.lang.String toString(boolean signed)
signed
- true if the sign should be displayed. false otherwise
public java.lang.String toString(short precision, boolean signed)
precision
- defined precisionsigned
- true if the sign should be displayed
public boolean equals(java.lang.Object o)
o
- Objet a comparer.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |