|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--java.lang.Number
|
+--com.braju.beta.lang.NumberVariable
|
+--com.braju.beta.lang.FloatVariable
Wraps a float and provides methods to convert the value to and from several datatypes [JDK1.0.2 compatible].
| Field Summary | |
static int |
ALWAYS_PERIOD
When converting a double to a string, this constant indicates that the result should always contain a period even if there is no digits following the period [...]. |
static float |
MAX_VALUE
The largest positive value of type float. |
static float |
MIN_VALUE
The smallest positive value of type float. |
static float |
NaN
A NaN (Not a Number) value of type float. |
static float |
NEGATIVE_INFINITY
The negative infinity of type float. |
static float |
POSITIVE_INFINITY
The positive infinity of type float. |
static int |
SIGNIFICANT_PRECISION
When converting a double to a string with specified precision, this constant indicates that the value of the precision specifies the number of significants [...]. |
static int |
SUPPRESS_PERIOD
When converting a double to a string, this constant indicates that the result should suppress the period if there is no digits following the period [...]. |
static int |
TRAILING_ZEROS
When converting a double to a string, this constant specifies that result should contain leading zeros. |
static java.lang.Class |
TYPE
The class of this static object [...]. |
| Fields inherited from class com.braju.beta.lang.NumberVariable |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, LEADING_ZEROS, NO_FLAGS, SIGN_ALWAYS, SIGN_MINUS, SIGN_SPACE |
| Constructor Summary | |
FloatVariable()
|
|
FloatVariable(float f)
Wraps a float into an object just like java.lang.Float does, but provides some additional methods. |
|
| Method Summary | |
byte |
byteValue()
Return the wrapped value as a byte. |
double |
doubleValue()
Return the wrapped value as a double. |
boolean |
equals(java.lang.Object obj)
Compare this object with another object [...]. |
float |
floatValue()
Return the wrapped value as a float. |
java.lang.Object |
get()
|
int |
hashCode()
Return a hash code for this object based on the wrapped value. |
int |
intValue()
Return the wrapped value as an int. |
long |
longValue()
Return the wrapped value as a long. |
static void |
main(java.lang.String[] args)
|
static FloatVariable[] |
newArray(int length)
Creates an array of length instance of this class. |
void |
set(float f)
Set a new value [...]. |
void |
set(java.lang.Object o)
|
short |
shortValue()
Return the wrapped value as a short. |
static java.lang.String |
toScientificString(float value,
int minWidth,
int precision,
int flags)
Convert a float into a string in scientific format using specified minimum width, precision and control flags [...]. |
java.lang.String |
toString()
Return the wrapped float as a String. |
static java.lang.String |
toString(float value)
Convert a float into a string [...]. |
static java.lang.String |
toString(float value,
int minWidth,
int precision,
int flags)
Convert a float into a string using specified minimum width, precision and control flags [...]. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final float MIN_VALUE
public static final float MAX_VALUE
public static final float NEGATIVE_INFINITY
public static final float POSITIVE_INFINITY
public static final float NaN
public static final java.lang.Class TYPE
public static final int TRAILING_ZEROS
public static final int SIGNIFICANT_PRECISION
public static final int ALWAYS_PERIOD
public static final int SUPPRESS_PERIOD
| Constructor Detail |
public FloatVariable()
public FloatVariable(float f)
| Method Detail |
public static FloatVariable[] newArray(int length)
public void set(float f)
public void set(java.lang.Object o)
set in interface Variableset in class NumberVariablepublic java.lang.Object get()
get in interface Variableget in class NumberVariablepublic byte byteValue()
byteValue in class java.lang.Numberpublic short shortValue()
shortValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic static java.lang.String toString(float value)
public static java.lang.String toString(float value,
int minWidth,
int precision,
int flags)
public java.lang.String toString()
toString in class java.lang.Object
public static java.lang.String toScientificString(float value,
int minWidth,
int precision,
int flags)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||