org.jooq.tools.unsigned
Class UByte

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

public final class UByte
extends UNumber
implements Comparable<UByte>

The unsigned byte type

Author:
Lukas Eder
See Also:
Serialized Form

Field Summary
static short MAX_VALUE
          A constant holding the maximum value an unsigned byte can have, 28-1.
static short MIN_VALUE
          A constant holding the minimum value an unsigned byte can have, 0.
 
Constructor Summary
UByte(byte value)
          Create an unsigned byte by masking it with 0xFF i.e.
UByte(short value)
          Create an unsigned byte
UByte(String value)
          Create an unsigned byte
 
Method Summary
 int compareTo(UByte o)
           
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
static UByte valueOf(byte value)
          Create an unsigned byte by masking it with 0xFF i.e.
static UByte valueOf(String value)
          Create an unsigned byte
 
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 short MIN_VALUE
A constant holding the minimum value an unsigned byte can have, 0.

See Also:
Constant Field Values

MAX_VALUE

public static final short MAX_VALUE
A constant holding the maximum value an unsigned byte can have, 28-1.

See Also:
Constant Field Values
Constructor Detail

UByte

public UByte(short value)
      throws NumberFormatException
Create an unsigned byte

Throws:
NumberFormatException - If value is not in the range of an unsigned byte
See Also:
UByte(short)

UByte

public UByte(byte value)
Create an unsigned byte by masking it with 0xFF i.e. (byte) -1 becomes (ubyte) 255


UByte

public UByte(String value)
      throws NumberFormatException
Create an unsigned byte

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

valueOf

public static UByte valueOf(String value)
                     throws NumberFormatException
Create an unsigned byte

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

valueOf

public static UByte valueOf(byte value)
Create an unsigned byte by masking it with 0xFF i.e. (byte) -1 becomes (ubyte) 255

See Also:
UByte(byte)

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


Copyright © 2012. All Rights Reserved.