Example usage for Java com.google.common.primitives Longs 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 long value. |
List | asList(long... backingArray) Returns a fixed-size list backed by the specified array, similar to Arrays#asList(Object[]) . |
int | compare(long a, long b) Compares the two specified long values. |
boolean | contains(long[] array, long target) Returns true if target is present as an element anywhere in array . |
long[] | ensureCapacity(long[] array, int minLength, int padding) Returns an array containing the same values as array , but guaranteed to be of a specified minimum length. |
long | fromByteArray(byte[] bytes) Returns the long value whose big-endian representation is stored in the first 8 bytes of bytes ; equivalent to ByteBuffer.wrap(bytes).getLong() . |
long | fromBytes(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8) Returns the long value whose byte representation is the given 8 bytes, in big-endian order; equivalent to Longs.fromByteArray(new byte[] {b1, b2, b3, b4, b5, b6, b7, b8})}. |
int | hashCode(long value) Returns a hash code for value ; equal to the result of invoking ((Long) value).hashCode() . |
int | indexOf(long[] array, long target) Returns the index of the first appearance of the value target in array . |
int | indexOf(long[] array, long[] target) Returns the start position of the first occurrence of the specified target within array , or -1 if there is no such occurrence. |
String | join(String separator, long... array) Returns a string containing the supplied long values separated by separator . |
int | lastIndexOf(long[] array, long target) Returns the index of the last appearance of the value target in array . |
long | max(long... array) Returns the greatest value present in array . |
long | min(long... array) Returns the least value present in array . |
Converter | stringConverter() Returns a serializable converter object that converts between strings and longs using Long#decode and Long#toString() . |
long[] | toArray(Collection extends Number> collection) Returns an array containing each value of collection , converted to a long value in the manner of Number#longValue . |
byte[] | toByteArray(long value) Returns a big-endian representation of value in an 8-element byte array; equivalent to ByteBuffer.allocate(8).putLong(value).array() . |
Long | tryParse(String string) Parses the specified string as a signed decimal long value. |