org.simantics.databoard.primitives
Class UnsignedLong

java.lang.Object
  extended by java.lang.Number
      extended by org.simantics.databoard.primitives.UnsignedLong
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.lang.Number>
Direct Known Subclasses:
UnsignedLong.Immutable, UnsignedLong.Mutable

public abstract class UnsignedLong
extends java.lang.Number
implements java.lang.Comparable<java.lang.Number>

Unsigned immutable 64-bit integer value. The value is between 0 and 18446744073709551615.

Author:
Toni Kalajainen
See Also:
Serialized Form

Nested Class Summary
static class UnsignedLong.Immutable
           
static class UnsignedLong.Mutable
           
 
Field Summary
static UnsignedLong MAX_VALUE
           
static UnsignedLong MIN_VALUE
           
static UnsignedLong ZERO
           
 
Constructor Summary
UnsignedLong()
           
 
Method Summary
 int compareTo(java.lang.Number obj)
           
 double doubleValue()
           
 boolean equals(java.lang.Object obj)
           
 float floatValue()
           
static UnsignedLong fromBits(long bits)
          Get cached or create new immutable unsigned long
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 java.math.BigInteger toBigInteger()
          Create big integer value
 long toBits()
           
 java.lang.String toString()
           
static UnsignedLong valueOf(long value)
          Get cached or create new immutable unsigned long
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final UnsignedLong MIN_VALUE

MAX_VALUE

public static final UnsignedLong MAX_VALUE

ZERO

public static final UnsignedLong ZERO
Constructor Detail

UnsignedLong

public UnsignedLong()
Method Detail

valueOf

public static UnsignedLong valueOf(long value)
Get cached or create new immutable unsigned long

Parameters:
value -
Returns:
immutable unsigned long

fromBits

public static UnsignedLong fromBits(long bits)
Get cached or create new immutable unsigned long

Parameters:
bits - long bits
Returns:
immutable unsigned long

toBits

public long toBits()

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

toBigInteger

public java.math.BigInteger toBigInteger()
Create big integer value

Returns:
new big integer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

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

compareTo

public int compareTo(java.lang.Number obj)
Specified by:
compareTo in interface java.lang.Comparable<java.lang.Number>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object