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

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

Introduction

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

The text is from its open source code.

Field

intBYTES
The number of bytes required to represent a primitive int value.
intMAX_POWER_OF_TWO
The largest power of two that can be represented as an int .

Method

ListasList(int... backingArray)
Returns a fixed-size list backed by the specified array, similar to Arrays#asList(Object[]) .
intcheckedCast(long value)
Returns the int value that is equal to value , if possible.
intcompare(int a, int b)
Compares the two specified int values.
int[]concat(int[]... arrays)
Returns the values from each provided array combined into a single array.
booleancontains(int[] array, int target)
Returns true if target is present as an element anywhere in array .
int[]ensureCapacity(int[] array, int minLength, int padding)
Returns an array containing the same values as array , but guaranteed to be of a specified minimum length.
intfromByteArray(byte[] bytes)
Returns the int value whose big-endian representation is stored in the first 4 bytes of bytes ; equivalent to ByteBuffer.wrap(bytes).getInt() .
intfromBytes(byte b1, byte b2, byte b3, byte b4)
Returns the int value whose byte representation is the given 4 bytes, in big-endian order; equivalent to Ints.fromByteArray(new byte[] {b1, b2, b3, b4})}.
inthashCode(int value)
Returns a hash code for value ; equal to the result of invoking ((Integer) value).hashCode() .
intindexOf(int[] array, int target)
Returns the index of the first appearance of the value target in array .
intindexOf(int[] array, int[] 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, int... array)
Returns a string containing the supplied int values separated by separator .
intlastIndexOf(int[] array, int target)
Returns the index of the last appearance of the value target in array .
ComparatorlexicographicalComparator()
Returns a comparator that compares two int arrays lexicographically.
intmax(int... array)
Returns the greatest value present in array .
intmin(int... array)
Returns the least value present in array .
intsaturatedCast(long value)
Returns the int nearest in value to value .
ConverterstringConverter()
Returns a serializable converter object that converts between strings and integers using Integer#decode and Integer#toString() .
int[]toArray(Collection collection)
Returns an array containing each value of collection , converted to a int value in the manner of Number#intValue .
byte[]toByteArray(int value)
Returns a big-endian representation of value in a 4-element byte array; equivalent to ByteBuffer.allocate(4).putInt(value).array() .
IntegertryParse(String string)
Parses the specified string as a signed decimal integer value.