public final class UShort extends UNumber implements Comparable<UShort>
unsigned short type| Modifier and Type | Field and Description | 
|---|---|
| static UShort | MAXA constant holding the maximum value an  unsigned shortcan
 have as UShort, 216-1. | 
| static int | MAX_VALUEA constant holding the maximum value an  unsigned shortcan
 have, 216-1. | 
| static UShort | MINA constant holding the minimum value an  unsigned shortcan
 have as UShort, 0. | 
| static int | MIN_VALUEA constant holding the minimum value an  unsigned shortcan
 have, 0. | 
| Modifier and Type | Method and Description | 
|---|---|
| UShort | add(int val) | 
| UShort | add(UShort val) | 
| int | compareTo(UShort o) | 
| double | doubleValue() | 
| boolean | equals(Object obj) | 
| float | floatValue() | 
| int | hashCode() | 
| int | intValue() | 
| long | longValue() | 
| UShort | subtract(int val) | 
| UShort | subtract(UShort val) | 
| BigInteger | toBigInteger()Get this number as a  BigInteger. | 
| String | toString() | 
| static UShort | valueOf(int value)Create an  unsigned short | 
| static UShort | valueOf(short value)Create an  unsigned shortby masking it with0xFFFFi.e. | 
| static UShort | valueOf(String value)Create an  unsigned short | 
byteValue, shortValuepublic static final int MIN_VALUE
unsigned short can
 have, 0.public static final int MAX_VALUE
unsigned short can
 have, 216-1.public static final UShort MIN
unsigned short can
 have as UShort, 0.public static final UShort MAX
unsigned short can
 have as UShort, 216-1.public static UShort valueOf(String value) throws NumberFormatException
unsigned shortNumberFormatException - If value does not contain a
                               parsable unsigned short.public static UShort valueOf(short value)
unsigned short by masking it with
 0xFFFF i.e. (short) -1 becomes
 (ushort) 65535public static UShort valueOf(int value) throws NumberFormatException
unsigned shortNumberFormatException - If value is not in the range
                               of an unsigned shortpublic float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic BigInteger toBigInteger()
UNumberBigInteger. This is a convenience method for
 calling new BigInteger(toString())toBigInteger in class UNumberpublic int compareTo(UShort o)
compareTo in interface Comparable<UShort>public UShort add(UShort val) throws NumberFormatException
NumberFormatExceptionpublic UShort add(int val) throws NumberFormatException
NumberFormatExceptionpublic UShort subtract(int val)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.