Class UShort
- java.lang.Object
-
- java.lang.Number
-
- org.apache.tika.parser.microsoft.onenote.fsshttpb.unsigned.UNumber
-
- org.apache.tika.parser.microsoft.onenote.fsshttpb.unsigned.UShort
-
- All Implemented Interfaces:
Serializable,Comparable<UShort>
public final class UShort extends UNumber implements Comparable<UShort>
Theunsigned shorttype- Author:
- Lukas Eder, Jens Nerche
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UShortMAXA constant holding the maximum value anunsigned shortcan have as UShort, 216-1.static intMAX_VALUEA constant holding the maximum value anunsigned shortcan have, 216-1.static UShortMINA constant holding the minimum value anunsigned shortcan have as UShort, 0.static intMIN_VALUEA constant holding the minimum value anunsigned shortcan have, 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UShortadd(int val)UShortadd(UShort val)intcompareTo(UShort o)doubledoubleValue()booleanequals(Object obj)floatfloatValue()inthashCode()intintValue()longlongValue()UShortsubtract(int val)UShortsubtract(UShort val)BigIntegertoBigInteger()Get this number as aBigInteger.StringtoString()static UShortvalueOf(int value)Create anunsigned shortstatic UShortvalueOf(short value)Create anunsigned shortby masking it with0xFFFFi.e.static UShortvalueOf(String value)Create anunsigned short-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
MIN_VALUE
public static final int MIN_VALUE
A constant holding the minimum value anunsigned shortcan have, 0.- See Also:
- Constant Field Values
-
MAX_VALUE
public static final int MAX_VALUE
A constant holding the maximum value anunsigned shortcan have, 216-1.- See Also:
- Constant Field Values
-
MIN
public static final UShort MIN
A constant holding the minimum value anunsigned shortcan have as UShort, 0.
-
MAX
public static final UShort MAX
A constant holding the maximum value anunsigned shortcan have as UShort, 216-1.
-
-
Method Detail
-
valueOf
public static UShort valueOf(String value) throws NumberFormatException
Create anunsigned short- Throws:
NumberFormatException- Ifvaluedoes not contain a parsableunsigned short.
-
valueOf
public static UShort valueOf(short value)
Create anunsigned shortby masking it with0xFFFFi.e.(short) -1becomes(ushort) 65535
-
valueOf
public static UShort valueOf(int value) throws NumberFormatException
Create anunsigned short- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned short
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
toBigInteger
public BigInteger toBigInteger()
Description copied from class:UNumberGet this number as aBigInteger. This is a convenience method for callingnew BigInteger(toString())- Overrides:
toBigIntegerin classUNumber
-
compareTo
public int compareTo(UShort o)
- Specified by:
compareToin interfaceComparable<UShort>
-
add
public UShort add(UShort val) throws NumberFormatException
- Throws:
NumberFormatException
-
add
public UShort add(int val) throws NumberFormatException
- Throws:
NumberFormatException
-
subtract
public UShort subtract(int val)
-
-