|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrebuild.util.ref.RefNumber
rebuild.util.ref.RefInteger
public final class RefInteger
Reference Integer is the same as Integer
but allows you to set the int without creating a new RefInteger
.
Field Summary | |
---|---|
static int |
MAX_VALUE
The largest value of type int. |
static int |
MIN_VALUE
The smallest value of type int. |
Fields inherited from class rebuild.util.ref.RefNumber |
---|
_fixed, BIT_SHIFT_LEFT, BIT_SHIFT_LEFT_LOGICAL, BIT_SHIFT_RIGHT, BIT_SHIFT_RIGHT_LOGICAL |
Constructor Summary | |
---|---|
RefInteger()
Create a new RefInteger set to the default of 0. |
|
RefInteger(int value)
Create a new RefInteger using a int primitive. |
|
RefInteger(int value,
boolean fixed)
Create a new RefInteger using a int primitive. |
|
RefInteger(java.lang.Integer value)
Create a new RefInteger using a Integer . |
|
RefInteger(java.lang.Integer value,
boolean fixed)
Create a new RefInteger using a Integer . |
Method Summary | |
---|---|
byte |
byteValue()
Returns the value of this Integer as a byte. |
RefInteger |
clone()
Create a clone of the current object. |
RefNumber |
cloneNumber()
Create a clone of the current object. |
double |
doubleValue()
Returns the value of this Integer as a double. |
float |
floatValue()
Returns the value of this Integer as a float. |
int |
hashCode()
Returns a hash code for this RefInteger object. |
int |
intValue()
Returns Returns the value of this RefInteger as an int. |
long |
longValue()
Returns the value of this Integer as a long. |
static int |
parseInt(java.lang.String s)
Parses the string argument as a signed decimal integer. |
static int |
parseInt(java.lang.String s,
int radix)
Parses the string argument as a signed integer in the radix specified by the second argument. |
RefInteger |
setValue(int value)
Set the value of this RefInteger object with a int primitive. |
RefInteger |
setValue(java.lang.Integer value)
Set the value of this RefInteger object with a Integer . |
short |
shortValue()
Returns the value of this Integer as a short. |
static java.lang.String |
toBinaryString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 2. |
static java.lang.String |
toHexString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 16. |
static java.lang.String |
toOctalString(int i)
Creates a string representation of the integer argument as an unsigned integer in base 8. |
java.lang.String |
toString()
Returns a String object representing this RefInteger 's value. |
static java.lang.String |
toString(int i)
Returns A new String object representing the specified integer. |
static java.lang.String |
toString(int i,
int radix)
Creates a string representation of the first argument in the radix specified by the second argument. |
static RefInteger |
valueOf(java.lang.String s)
Returns a new RefInteger object initialized to the value of the specified String . |
static RefInteger |
valueOf(java.lang.String s,
int radix)
Returns a new RefInteger object initialized to the value of the specified String . |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_VALUE
public static final int MIN_VALUE
Constructor Detail |
---|
public RefInteger()
RefInteger
set to the default of 0.
public RefInteger(int value)
RefInteger
using a int primitive.
value
- The int primitive to set this RefInteger
with.public RefInteger(int value, boolean fixed)
RefInteger
using a int primitive.
value
- The int primitive to set this RefInteger
with.fixed
- If this item is read only and cannot be modified.public RefInteger(java.lang.Integer value)
RefInteger
using a Integer
.
value
- The Integer
to set this RefInteger
with.public RefInteger(java.lang.Integer value, boolean fixed)
RefInteger
using a Integer
.
value
- The Integer
to set this RefInteger
with.fixed
- If this item is read only and cannot be modified.Method Detail |
---|
public int intValue()
RefInteger
as an int.
public RefInteger setValue(int value)
RefInteger
object with a int primitive.
value
- The primitive int value to set this object.
public RefInteger setValue(java.lang.Integer value)
RefInteger
object with a Integer
.
value
- The Integer
value to set this object.
public int hashCode()
RefInteger
object.
hashCode
in class java.lang.Object
public java.lang.String toString()
String
object representing this RefInteger
's value.
toString
in class java.lang.Object
public byte byteValue()
Integer
as a byte.
Integer
as a byte.public double doubleValue()
Integer
as a double.
public float floatValue()
Integer
as a float.
public long longValue()
Integer
as a long.
public short shortValue()
Integer
as a short.
public static int parseInt(java.lang.String s)
s
- A string.
java.lang.NumberFormatException
- If the string does not contain a parsable integer.public static int parseInt(java.lang.String s, int radix)
s
- The String
containing the integer.radix
- The radix to be used.
java.lang.NumberFormatException
- If the string does not contain a parsable integer.public static java.lang.String toBinaryString(int i)
i
- An integer.
public static java.lang.String toHexString(int i)
i
- An integer.
public static java.lang.String toOctalString(int i)
i
- An integer.
public static java.lang.String toString(int i)
String
object representing the specified integer.
i
- An integer to be converted.
public static java.lang.String toString(int i, int radix)
i
- An integer.radix
- The radix.
public static RefInteger valueOf(java.lang.String s)
RefInteger
object initialized to the value of the specified String
.
s
- The string to be parsed.
RefInteger
initialized to the value represented by the string argument.
java.lang.NumberFormatException
- If the string cannot be parsed as an integer.public static RefInteger valueOf(java.lang.String s, int radix)
RefInteger
object initialized to the value of the specified String
.
s
- The string to be parsed.radix
- The radix of the integer represented by string s.
RefInteger
initialized to the value represented by the string argument in the specified radix.
java.lang.NumberFormatException
- If the String
cannot be parsed as an int.public RefInteger clone()
RefInteger
.public RefNumber cloneNumber()
cloneNumber
in class RefNumber
RefInteger
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |