|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Number
com.foxsmart.ic.lang.Hexadecimal
public class Hexadecimal
This class represents a hexadecimal value.
| Constructor Summary | |
|---|---|
Hexadecimal()
Constructs a hexadecimmal object with the value of 0. |
|
Hexadecimal(java.lang.Integer value)
Constructs a hexadecimal object based on an integer value. |
|
Hexadecimal(java.lang.Long value)
Constructs a hexadecimal object based on a long value. |
|
Hexadecimal(java.lang.String value)
Constructs a hexadecimal object based on a string representation of the value (e.g. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this hexadecimal object. |
int |
compareTo(java.lang.Object object)
Compares this objejct to the passed in object. |
double |
doubleValue()
Gets the value as a double. |
boolean |
equals(java.lang.Object object)
Returns whether the passed in object is equal to this object. |
float |
floatValue()
Gets the value as a float. |
boolean |
getPrependHexIdentifier()
Gets whether the hexadecimal identifier will be prepended to the returned value of the toString method. |
boolean |
getUppercase()
Returns whether the toString method will return upper case or not. |
int |
getWidth()
Gets the width. |
int |
hashCode()
Returns the hash code for this object. |
int |
intValue()
Gets the value as an integer. |
long |
longValue()
Gets the value as a long. |
static void |
main(java.lang.String[] args)
Test driver. |
void |
setPrependHexIdentifier(boolean hexIdentifier)
Sets whether the hexadecimal identifier "0x" will be prepended to the returned value of the toString method. |
void |
setUppercase(boolean uppercase)
Determines whether the toString return value will be in upper case or lower case. |
void |
setWidth(int width)
Sets the forced width of the returned hexadecimal string (i.e. |
java.lang.String |
toString()
Displays the string representation of this value in hexadecimal. |
| Methods inherited from class java.lang.Number |
|---|
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hexadecimal()
public Hexadecimal(java.lang.Long value)
value - The value as an long.public Hexadecimal(java.lang.Integer value)
value - The value as an integer.
public Hexadecimal(java.lang.String value)
throws java.lang.NumberFormatException
value - The value as a string.
java.lang.NumberFormatException - if the string can't be converted to a value.| Method Detail |
|---|
public long longValue()
longValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic int hashCode()
hashCode in class java.lang.Objectpublic int compareTo(java.lang.Object object)
object - The object to compare.
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to compare.
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectpublic void setUppercase(boolean uppercase)
uppercase - Set to true for upper case or false for lower case.public boolean getUppercase()
public void setPrependHexIdentifier(boolean hexIdentifier)
hexIdentifier - The hexadecimal identifier.public boolean getPrependHexIdentifier()
public void setWidth(int width)
width - the width to set.public int getWidth()
public static void main(java.lang.String[] args)
args - The arguments.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||