com.cmpware.ide.views
Class HexInteger

java.lang.Object
  extended by java.lang.Number
      extended by com.cmpware.ide.views.HexInteger
All Implemented Interfaces:
java.io.Serializable

public class HexInteger
extends java.lang.Number

This class just subclasses Integer and indicates that this Integer should be displayed in Hexadecimal. Since Integer is final, we have to subclass Number and do a bit of work.

Copyright (c) 2007 Cmpware, Inc. All Rights Reserved.

See Also:
Serialized Form

Constructor Summary
HexInteger(int a)
          The HexInteger constructor
 
Method Summary
 int compareTo(HexInteger hi)
          Compares two HexIntegers numerically.
 double doubleValue()
           
 float floatValue()
           
 int intValue()
           
 long longValue()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HexInteger

public HexInteger(int a)
The HexInteger constructor

Parameters:
a - the integer value
Method Detail

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number

compareTo

public int compareTo(HexInteger hi)
Compares two HexIntegers numerically.

Parameters:
hi - The hex integer to be compared.
Returns:
the value 0 if this HexInteger is equal to the argument HexInteger; a value less than 0 if this HexInteger is numerically' less than the argument HexInteger; and a value greater than 0 if this HexInteger is numerically greater than the argument HexInteger (signed comparison).

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object