org.simantics.databoard.primitives
Class UnsignedInteger

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

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

Unsigned 32-bit integer value, either mutable or immutable. The value is between 0 and 4294967295. Example use: UnsignedInteger x = new UnsignedInteger.Mutable(); UnsignedInteger y = new UnsignedInteger.Immutable(4); UnsignedInteger z = UnsingedInteger.valueOf(5);

Author:
Toni Kalajainen
See Also:
Serialized Form

Nested Class Summary
static class UnsignedInteger.Immutable
           
static class UnsignedInteger.Mutable
           
 
Field Summary
static long L_MAX_VALUE
           
static long L_MIN_VALUE
           
static UnsignedInteger MAX_VALUE
           
static UnsignedInteger MIN_VALUE
           
static UnsignedInteger ZERO
           
 
Constructor Summary
UnsignedInteger()
           
 
Method Summary
 int compareTo(java.lang.Number obj)
           
 double doubleValue()
           
 boolean equals(java.lang.Object obj)
           
 float floatValue()
           
static UnsignedInteger fromBits(int intBits)
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 int toBits()
           
 java.lang.String toString()
           
static UnsignedInteger valueOf(long value)
           
 
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 UnsignedInteger MIN_VALUE

MAX_VALUE

public static final UnsignedInteger MAX_VALUE

ZERO

public static final UnsignedInteger ZERO

L_MAX_VALUE

public static final long L_MAX_VALUE
See Also:
Constant Field Values

L_MIN_VALUE

public static final long L_MIN_VALUE
See Also:
Constant Field Values
Constructor Detail

UnsignedInteger

public UnsignedInteger()
Method Detail

fromBits

public static UnsignedInteger fromBits(int intBits)

valueOf

public static UnsignedInteger valueOf(long value)

toBits

public int 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

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