|
|
|||||||||||
| 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.LongVariable
Wraps a long and provides methods to convert the value to and from several datatypes [JDK1.0.2 compatible].
| Field Summary | |
static long |
MAX_VALUE
The maximum value a long can have. |
static long |
MIN_VALUE
The minimum value a long can have. |
static int |
PREFIX
When converting a long to a String using another bases, i.e. |
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 | |
LongVariable()
|
|
LongVariable(long l)
Wraps a long into an object just like java.lang.Long 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 LongVariable[] |
newArray(int length)
Creates an array of length instance of this class. |
void |
set(long l)
Set a new value [...]. |
void |
set(java.lang.Object o)
|
short |
shortValue()
Return the wrapped value as a short. |
static java.lang.String |
toBinaryString(long value)
Convert a long into a String using the binaries base {0,1} [...]. |
static java.lang.String |
toBinaryString(long l,
int minWidth,
int flags)
Convert a long into a String using the binaries base {0,1} and specified minimum width and control flags [...]. |
static java.lang.String |
toHexString(long value)
Convert a long into a String using the hexadecimal base {0-9,a-f} [...]. |
static java.lang.String |
toHexString(long l,
int minWidth,
int flags)
Convert a long into a String using the hexadecimal base {0-9,a-f} and specified minimum width and control flags [...]. |
static java.lang.String |
toOctalString(long l)
Convert a long into a String using the octal base {0-7} [...]. |
static java.lang.String |
toOctalString(long value,
int minWidth,
int flags)
Convert a long into a String using the octal base {0-7} and specified minimum width and control flags [...]. |
java.lang.String |
toString()
Return the wrapped long as a String. |
static java.lang.String |
toString(long l)
Convert a long into a string. |
static java.lang.String |
toString(long l,
int minWidth,
int flags)
Convert a long into a string using specified minimum width and control flags [...]. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final long MIN_VALUE
public static final long MAX_VALUE
public static final java.lang.Class TYPE
public static final int PREFIX
| Constructor Detail |
public LongVariable()
public LongVariable(long l)
| Method Detail |
public static LongVariable[] newArray(int length)
public void set(long l)
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 toBinaryString(long value)
public static java.lang.String toBinaryString(long l,
int minWidth,
int flags)
public static java.lang.String toOctalString(long l)
public static java.lang.String toOctalString(long value,
int minWidth,
int flags)
public static java.lang.String toHexString(long value)
public static java.lang.String toHexString(long l,
int minWidth,
int flags)
public static java.lang.String toString(long l,
int minWidth,
int flags)
public static java.lang.String toString(long l)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals 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 | |||||||||||