Arrays provides.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < the element type E> E[] | Returns: the compacted (possibly empty) arraythe original array (not original)null, will be modified)Create a new array from the original which contains no |
| public static < the element type E> E[] | Returns: the arraythe element type class elementType, int the array size size)Create an array of the given size, ensuring type safety. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for an arraythe first array (must not be a1, int null)the offset into the first array offs1, byte[] the second array (must not be a2, int null)the offset into the second array offs2, int the length to compare len)Compare two sub-regions of the given arrays. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for an arraythe first array (must not be a1, int null)the offset into the first array offs1, byte[] the second array (must not be a2)null)Compare two sub-regions of the given arrays. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for an arraythe first array (must not be a1, int null)the offset into the first array offs1, char[] the second array (must not be a2, int null)the offset into the second array offs2, int the length to compare len)Compare two sub-regions of the given arrays. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for an arraythe first array (must not be a1, int null)the offset into the first array offs1, char[] the second array (must not be a2)null)Compare two sub-regions of the given arrays. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for the array or stringthe array (must not be a1, int null)the offset into the array offs1, String the string (must not be a2, int null)the offset into the string offs2, int the length to compare len)Compare two sub-regions of the given array and string. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for the array or stringthe array (must not be a1, int null)the offset into the array offs1, String the string (must not be a2)null)Compare two sub-regions of the given array and string. |
| public static boolean | Returns: true if the regions are equal, or false if the regions are not equal or a length or offset
is out of bounds for the array or stringthe string (must not be a1, int null)the offset into the string offs1, char[] the array (must not be a2)null)Compare two sub-regions of the given array and string. |
| public static boolean | |
| private static char | |
| public static int | Returns: the index, or -1 if the byte is not foundthe array to search array, int the byte to search for search, int the offset in the array to start searching offs, int the length of the segment to search len)Find the first occurrence of a byte in a byte array. |
| public static int | Returns: the index, or -1 if the byte is not foundthe array to search array, int the byte to search for search, int the offset in the array to start searching offs)Find the first occurrence of a byte in a byte array. |
| public static int | Returns: the index, or -1 if the byte is not foundthe array to search array, int the byte to search for search)Find the first occurrence of a byte in a byte array. |
| public static String | Returns: the stringthe value to convert value)Deeply convert an object to a string, expanding arrays as they are encountered. |
| public static < the item type T> T[] | |
| public static String | Returns: the stringthe byte array (must not be bytes)null)Render the given byte array as a hexadecimal string in big-endian order. |
| Arrays2 | back to summary |
|---|---|
| private Arrays2() | |
| compactNulls | back to summary |
|---|---|
| public static <E> E[] compactNulls(E[] original) Create a new array from the original which contains no
| |
| createArray | back to summary |
|---|---|
| public static <E> E[] createArray(Class<E> elementType, int size) Create an array of the given size, ensuring type safety.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(byte[] a1, int offs1, byte[] a2, int offs2, int len) Compare two sub-regions of the given arrays.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(byte[] a1, int offs1, byte[] a2) Compare two sub-regions of the given arrays.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(char[] a1, int offs1, char[] a2, int offs2, int len) Compare two sub-regions of the given arrays.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(char[] a1, int offs1, char[] a2) Compare two sub-regions of the given arrays.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(char[] a1, int offs1, String a2, int offs2, int len) Compare two sub-regions of the given array and string.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(char[] a1, int offs1, String a2) Compare two sub-regions of the given array and string.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(String a1, int offs1, char[] a2) Compare two sub-regions of the given array and string.
| |
| equals | back to summary |
|---|---|
| public static boolean equals(String a1, char[] a2) Compare the given array and string.
| |
| hex | back to summary |
|---|---|
| private static char hex(int v) | |
| indexOf | back to summary |
|---|---|
| public static int indexOf(byte[] array, int search, int offs, int len) Find the first occurrence of a byte in a byte array.
| |
| indexOf | back to summary |
|---|---|
| public static int indexOf(byte[] array, int search, int offs) Find the first occurrence of a byte in a byte array.
| |
| indexOf | back to summary |
|---|---|
| public static int indexOf(byte[] array, int search) Find the first occurrence of a byte in a byte array.
| |
| objectToString | back to summary |
|---|---|
| public static String objectToString(Object value) Deeply convert an object to a string, expanding arrays as they are encountered. | |
| of | back to summary |
|---|---|
| public static <T> T[] of(final T... items) Return the varargs list as its array representation.
| |
| toString | back to summary |
|---|---|
| public static String toString(final byte[] bytes) Render the given byte array as a hexadecimal string in big-endian order.
| |