Example usage for Java com.google.common.primitives Shorts fields, constructors, methods, implement or subclass
The text is from its open source code.
int | BYTES The number of bytes required to represent a primitive short value. |
List | asList(short... backingArray) Returns a fixed-size list backed by the specified array, similar to Arrays#asList(Object[]) . |
short | checkedCast(long value) Returns the short value that is equal to value , if possible. |
int | compare(short a, short b) Compares the two specified short values. |
short | fromByteArray(byte[] bytes) Returns the short value whose big-endian representation is stored in the first 2 bytes of bytes ; equivalent to ByteBuffer.wrap(bytes).getShort() . |
short | fromBytes(byte b1, byte b2) Returns the short value whose byte representation is the given 2 bytes, in big-endian order; equivalent to Shorts.fromByteArray(new byte[] {b1, b2})}. |
int | hashCode(short value) Returns a hash code for value ; equal to the result of invoking ((Short) value).hashCode() . |
short | saturatedCast(long value) Returns the short nearest in value to value . |
short[] | toArray(Collection extends Number> collection) Returns an array containing each value of collection , converted to a short value in the manner of Number#shortValue . |
byte[] | toByteArray(short value) Returns a big-endian representation of value in a 2-element byte array; equivalent to ByteBuffer.allocate(2).putShort(value).array() . |