org.jooq.tools.unsigned
Class UShort

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

public final class UShort
extends UNumber
implements Comparable<UShort>

The unsigned short type

Author:
Lukas Eder
See Also:
Serialized Form

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

See Also:
Constant Field Values

MAX_VALUE

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

See Also:
Constant Field Values
Constructor Detail

UShort

@Deprecated
public UShort(int value)
       throws NumberFormatException
Deprecated. - Use valueOf(int), or Unsigned.ushort(int) instead

Create an unsigned short

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

UShort

@Deprecated
public UShort(short value)
Deprecated. - Use valueOf(short), or Unsigned.ushort(short) instead

Create an unsigned short by masking it with 0xFFFF i.e. (short) -1 becomes (ushort) 65535


UShort

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

Create an unsigned short

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

valueOf

public static UShort valueOf(String value)
                      throws NumberFormatException
Create an unsigned short

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

valueOf

public static UShort valueOf(short value)
Create an unsigned short by masking it with 0xFFFF i.e. (short) -1 becomes (ushort) 65535


valueOf

public static UShort valueOf(int value)
                      throws NumberFormatException
Create an unsigned short

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

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


Copyright © 2012. All Rights Reserved.