org.jooq.tools.unsigned
Class ULong

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

public final class ULong
extends UNumber
implements Comparable<ULong>

The unsigned long type

Author:
Lukas Eder
See Also:
Serialized Form

Field Summary
static BigInteger MAX_VALUE
          A constant holding the maximum value an unsigned long can have, 264-1.
static BigInteger MAX_VALUE_LONG
          A constant holding the maximum value + 1 an signed long can have, 263.
static BigInteger MIN_VALUE
          A constant holding the minimum value an unsigned long can have, 0.
 
Constructor Summary
ULong(BigInteger value)
          Deprecated. - Use valueOf(BigInteger), or Unsigned.ulong(BigInteger) instead
ULong(long value)
          Deprecated. - Use valueOf(long), or Unsigned.ulong(long) instead
ULong(String value)
          Deprecated. - Use valueOf(String), or Unsigned.ulong(String) instead
 
Method Summary
 int compareTo(ULong o)
           
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
static ULong valueOf(BigInteger value)
          Create an unsigned long
static ULong valueOf(long value)
          Create an unsigned long by masking it with 0xFFFFFFFFFFFFFFFF i.e.
static ULong valueOf(String value)
          Create an unsigned long
 
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 BigInteger MIN_VALUE
A constant holding the minimum value an unsigned long can have, 0.


MAX_VALUE

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


MAX_VALUE_LONG

public static final BigInteger MAX_VALUE_LONG
A constant holding the maximum value + 1 an signed long can have, 263.

Constructor Detail

ULong

@Deprecated
public ULong(BigInteger value)
      throws NumberFormatException
Deprecated. - Use valueOf(BigInteger), or Unsigned.ulong(BigInteger) instead

Create an unsigned long

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

ULong

@Deprecated
public ULong(long value)
Deprecated. - Use valueOf(long), or Unsigned.ulong(long) instead

Create an unsigned long by masking it with 0xFFFFFFFFFFFFFFFF i.e. (long) -1 becomes (uint) 18446744073709551615


ULong

@Deprecated
public ULong(String value)
      throws NumberFormatException
Deprecated. - Use valueOf(String), or Unsigned.ulong(String) instead

Create an unsigned long

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

valueOf

public static ULong valueOf(String value)
                     throws NumberFormatException
Create an unsigned long

Throws:
NumberFormatException - If value does not contain a parsable unsigned long.

valueOf

public static ULong valueOf(long value)
Create an unsigned long by masking it with 0xFFFFFFFFFFFFFFFF i.e. (long) -1 becomes (uint) 18446744073709551615


valueOf

public static ULong valueOf(BigInteger value)
                     throws NumberFormatException
Create an unsigned long

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

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(ULong o)
Specified by:
compareTo in interface Comparable<ULong>


Copyright © 2012. All Rights Reserved.