Java com.google.common.primitives Longs fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.primitives Longs fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.primitives Longs.

The text is from its open source code.

Field

intBYTES
The number of bytes required to represent a primitive long value.

Method

ListasList(long... backingArray)
Returns a fixed-size list backed by the specified array, similar to Arrays#asList(Object[]) .
intcompare(long a, long b)
Compares the two specified long values.
booleancontains(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.
longfromByteArray(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() .
longfromBytes(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})}.
inthashCode(long value)
Returns a hash code for value ; equal to the result of invoking ((Long) value).hashCode() .
intindexOf(long[] array, long target)
Returns the index of the first appearance of the value target in array .
intindexOf(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.
Stringjoin(String separator, long... array)
Returns a string containing the supplied long values separated by separator .
intlastIndexOf(long[] array, long target)
Returns the index of the last appearance of the value target in array .
longmax(long... array)
Returns the greatest value present in array .
longmin(long... array)
Returns the least value present in array .
ConverterstringConverter()
Returns a serializable converter object that converts between strings and longs using Long#decode and Long#toString() .
long[]toArray(Collection 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() .
LongtryParse(String string)
Parses the specified string as a signed decimal long value.