All Implemented Interfaces:
Serializable, Comparable<Short>, Constable

  • Field Summary

    Fields

    static final int

    The number of bytes used to represent a short value in two's complement binary form.

    static final short

    A constant holding the maximum value a short can have, 215-1.

    static final short

    A constant holding the minimum value a short can have, -215.

    static final int

    The number of bits used to represent a short value in two's complement binary form.

    The Class instance representing the primitive type short.

  • Constructor Summary

    Constructors

  • Method Summary

    byte

    byteValue()

    Returns the value of this Short as a byte after a narrowing primitive conversion.

    static int

    compare(short x, short y)

    Compares two short values numerically.

    int

    Compares two Short objects numerically.

    static int

    compareUnsigned(short x, short y)

    Compares two short values numerically treating the values as unsigned.

    Decodes a String into a Short.

    Returns an Optional containing the nominal descriptor for this instance.

    double

    Returns the value of this Short as a double after a widening primitive conversion.

    boolean

    Compares this object to the specified object.

    float

    Returns the value of this Short as a float after a widening primitive conversion.

    int

    hashCode()

    Returns a hash code for this Short; equal to the result of invoking intValue().

    static int

    hashCode(short value)

    Returns a hash code for a short value; compatible with Short.hashCode().

    int

    intValue()

    Returns the value of this Short as an int after a widening primitive conversion.

    long

    longValue()

    Returns the value of this Short as a long after a widening primitive conversion.

    static short

    Parses the string argument as a signed decimal short.

    static short

    Parses the string argument as a signed short in the radix specified by the second argument.

    static short

    reverseBytes(short i)

    Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified short value.

    short

    Returns the value of this Short as a short.

    toString()

    Returns a String object representing this Short's value.

    toString(short s)

    Returns a new String object representing the specified short.

    static int

    toUnsignedInt(short x)

    Converts the argument to an int by an unsigned conversion.

    static long

    toUnsignedLong(short x)

    Converts the argument to a long by an unsigned conversion.

    valueOf(short s)

    Returns a Short instance representing the specified short value.

    Returns a Short object holding the value given by the specified String.

    Returns a Short object holding the value extracted from the specified String when parsed with the radix given by the second argument.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Creates and returns a copy of this object.

    protected void

    Deprecated, for removal: This API element is subject to removal in a future version.

    Returns the runtime class of this Object.

    final void

    Wakes up a single thread that is waiting on this object's monitor.

    final void

    Wakes up all threads that are waiting on this object's monitor.

    final void

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

    final void

    wait(long timeoutMillis)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

    final void

    wait(long timeoutMillis, int nanos)

    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

  • Field Details

    • MIN_VALUE

    • MAX_VALUE

    • TYPE

    • SIZE

    • BYTES

  • Constructor Details

    • Short

    • Short

  • Method Details

    • toString

    • parseShort

    • parseShort

    • valueOf

    • valueOf

    • describeConstable

    • valueOf

    • decode

    • byteValue

    • shortValue

    • intValue

    • longValue

    • floatValue

    • doubleValue

    • toString

    • hashCode

    • hashCode

    • equals

    • compareTo

    • compare

    • compareUnsigned

    • reverseBytes

    • toUnsignedInt

    • toUnsignedLong