org.jooq.tools.unsigned
Class UInteger

java.lang.Object
  extended by java.lang.Number
      extended by org.jooq.tools.unsigned.UNumber
          extended by org.jooq.tools.unsigned.UInteger
All Implemented Interfaces:
Serializable, Comparable<UInteger>

public final class UInteger
extends UNumber
implements Comparable<UInteger>

The unsigned int type

Author:
Lukas Eder
See Also:
Serialized Form

Field Summary
static long MAX_VALUE
          A constant holding the maximum value an unsigned int can have, 232-1.
static long MIN_VALUE
          A constant holding the minimum value an unsigned int can have, 0.
 
Constructor Summary
UInteger(int value)
          Create an unsigned int by masking it with 0xFFFFFFFF i.e.
UInteger(long value)
          Create an unsigned int
UInteger(String value)
          Create an unsigned int
 
Method Summary
 int compareTo(UInteger o)
           
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
static UInteger valueOf(int value)
          Create an unsigned int by masking it with 0xFFFFFFFF i.e.
static UInteger valueOf(String value)
          Create an unsigned int
 
Methods inherited from class org.jooq.tools.unsigned.UNumber
toBigInteger
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final long MIN_VALUE
A constant holding the minimum value an unsigned int can have, 0.

See Also:
Constant Field Values

MAX_VALUE

public static final long MAX_VALUE
A constant holding the maximum value an unsigned int can have, 232-1.

See Also:
Constant Field Values
Constructor Detail

UInteger

public UInteger(long value)
         throws NumberFormatException
Create an unsigned int

Throws:
NumberFormatException - If value is not in the range of an unsigned int

UInteger

public UInteger(int value)
Create an unsigned int by masking it with 0xFFFFFFFF i.e. (int) -1 becomes (uint) 4294967295


UInteger

public UInteger(String value)
         throws NumberFormatException
Create an unsigned int

Throws:
NumberFormatException - If value does not contain a parsable unsigned int.
Method Detail

valueOf

public static UInteger valueOf(String value)
                        throws NumberFormatException
Create an unsigned int

Throws:
NumberFormatException - If value does not contain a parsable unsigned int.
See Also:
UInteger(String)

valueOf

public static UInteger valueOf(int value)
Create an unsigned int by masking it with 0xFFFFFFFF i.e. (int) -1 becomes (uint) 4294967295

See Also:
UInteger(int)

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(UInteger o)
Specified by:
compareTo in interface Comparable<UInteger>


Copyright © 2012. All Rights Reserved.