long primitives, that are not already found in
either Long or Arrays.
See the Guava User Guide article on primitive utilities.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static enum | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | BYTES
The number of bytes required to represent a primitive |
| public static final long | MAX_POWER_OF_TWO
The largest power of two that can be represented as a |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static List | Returns: a list view of the arraythe array to back the list backingArray)Returns a fixed-size list backed by the specified array, similar to |
| private static int | |
| public static int | Returns: a negative value ifa is less than b; a positive value if a is
greater than b; or zero if they are equalthe first a, long long to comparethe second b)long to compareCompares the two specified |
| public static long[] | Returns: a single array containing all the values from the source arrays, in orderzero or more arrays)long arraysReturns the values from each provided array combined into a single array. |
| public static long | constrainToRange(long
the value, long long value to constrainthe lower bound (inclusive) of the range to constrain min, long value tothe upper bound (inclusive) of the range to constrain max)value toReturns the value nearest to |
| public static boolean | Returns: true if array[i] == target for some value of ian array of array, long long values, possibly emptya primitive target)long valueReturns |
| public static long[] | Returns: an array containing the values ofarray, with guaranteed minimum length minLengththe source array array, int the minimum length the returned array must guarantee minLength, int an extra amount to "grow" the array by if growth is necessary padding)Returns an array containing the same values as |
| public static long | fromByteArray(byte[] bytes)
Returns the |
| public static long | fromBytes(byte b1, byte b2, byte b3, byte b4, byte b5, byte b6, byte b7, byte b8)
Returns the |
| public static int | Returns: a hash code for the valuea primitive value)long valueReturns a hash code for |
| public static int | Returns: the least indexi for which array[i] == target, or -1 if no
such index exists.an array of array, long long values, possibly emptya primitive target)long valueReturns the index of the first appearance of the value |
| private static int | |
| public static int | indexOf(long[]
the array to search for the sequence array, long[] targetthe array to search for as a sub-sequence of target)arrayReturns the start position of the first occurrence of the specified |
| public static String | |
| public static int | Returns: the greatest indexi for which array[i] == target, or -1 if no
such index exists.an array of array, long long values, possibly emptya primitive target)long valueReturns the index of the last appearance of the value |
| private static int | |
| public static Comparator | |
| public static long | Returns: the value present inarray that is greater than or equal to every other value
in the arraya nonempty array of array)long valuesReturns the greatest value present in |
| public static long | Returns: the value present inarray that is less than or equal to every other value in
the arraya nonempty array of array)long valuesReturns the least value present in |
| public static void | |
| public static void | reverse(long[] array, int fromIndex, int toIndex)
Reverses the elements of |
| public static void | rotate(long[] array, int distance)
Performs a right rotation of |
| public static void | rotate(long[] array, int distance, int fromIndex, int toIndex)
Performs a right rotation of |
| public static void | |
| public static void | sortDescending(long[] array, int fromIndex, int toIndex)
Sorts the elements of |
| public static Converter | stringConverter()
Returns a serializable converter object that converts between strings and longs using |
| public static long[] | Returns: an array containing the same values ascollection, in the same order, converted
to primitivesa collection of collection)Number instancesReturns an array containing each value of |
| public static byte[] | toByteArray(long value)
Returns a big-endian representation of |
| public static Long | |
| public static Long | Returns: the long value represented bystring using radix, or null if
string has a length of zero or cannot be parsed as a long valuethe string representation of a long value string, int the radix to use when parsing radix)Parses the specified string as a signed long value using the specified radix. |