| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static Object | |
| pack-priv static Object[] | |
| pack-priv static Object[] | |
| public static <T extends @Nullable Object> T[] | |
| public static <T extends @Nullable Object> T[] | Returns: an array whose size is one larger thanarray, with element occupying
the first position, and the elements of array occupying the remaining elements.the element to prepend to the front of element, T[] arraythe array of elements to append array)Returns a new array that prepends |
| public static <T extends @Nullable Object> T[] | Returns: an array whose size is one larger thanarray, with the same contents as array, plus element occupying the last position.the array of elements to prepend array, T the element to append to the end element)Returns a new array that appends |
| pack-priv static @Nullable Object[] | copyAsObjectArray(@Nullable Object[] elements, int offset, int length)
Returns a copy of the specified subrange of the specified array that is literally an Object[],
and not e.g. a |
| private static @Nullable Object[] | |
| public static <T extends @Nullable Object> T[] | |
| public static <T extends @Nullable Object> T[] | newArray(T[]
any array of the desired type reference, int the length of the new array length)Returns a new array of the given length with the same type as a reference array. |
| pack-priv static void | |
| pack-priv static <T extends @Nullable Object> T[] | toArrayImpl(Collection<?>
the collection for which to return an array of elements c, T[] the array in which to place the collection elements array)Returns an array containing all of the elements in the specified collection; the runtime type of the returned array is that of the specified array. |
| pack-priv static <T extends @Nullable Object> T[] | toArrayImpl(@Nullable Object[] src, int offset, int len, T[] dst)
Implementation of |
| pack-priv static @Nullable Object[] | toArrayImpl(Collection<?>
the collection for which to return an array of elements c)Returns an array containing all of the elements in the specified collection. |
| ObjectArrays | back to summary |
|---|---|
| private ObjectArrays() | |
| checkElementNotNull | back to summary |
|---|---|
pack-priv static Object checkElementNotNull(Object element, int index)
| |
| checkElementsNotNull | back to summary |
|---|---|
pack-priv static Object[] checkElementsNotNull(Object... array)
| |
| checkElementsNotNull | back to summary |
|---|---|
pack-priv static Object[] checkElementsNotNull(Object[] array, int length)
| |
| concat | back to summary |
|---|---|
| public static <T extends @Nullable Object> T[] concat(T[] first, T[] second, Class<@NonNull T> type) Returns a new array that contains the concatenated contents of two arrays.
| |
| concat | back to summary |
|---|---|
| public static <T extends @Nullable Object> T[] concat(T element, T[] array) Returns a new array that prepends
| |
| concat | back to summary |
|---|---|
| public static <T extends @Nullable Object> T[] concat(T[] array, T element) Returns a new array that appends
| |
| copyAsObjectArray | back to summary |
|---|---|
| pack-priv static @Nullable Object[] copyAsObjectArray(@Nullable Object[] elements, int offset, int length) Returns a copy of the specified subrange of the specified array that is literally an Object[],
and not e.g. a | |
| fillArray | back to summary |
|---|---|
private static @Nullable Object[] fillArray(Iterable<?> elements, @Nullable Object[] array)
| |
| newArray | back to summary |
|---|---|
| public static <T extends @Nullable Object> T[] newArray(Class<@NonNull T> type, int length) Returns a new array of the given length with the specified component type.
| |
| newArray | back to summary |
|---|---|
| public static <T extends @Nullable Object> T[] newArray(T[] reference, int length) Returns a new array of the given length with the same type as a reference array.
| |
| swap | back to summary |
|---|---|
| pack-priv static void swap(Object[] array, int i, int j) Swaps | |
| toArrayImpl | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> T[] toArrayImpl(Collection<?> c, T[] array) Returns an array containing all of the elements in the specified collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of the specified collection. If the collection fits in the specified array with room to spare (i.e., the array has more
elements than the collection), the element in the array immediately following the end of the
collection is set to This method returns the elements in the order they are returned by the collection's iterator. TODO(kevinb): support concurrently modified collections?
| |
| toArrayImpl | back to summary |
|---|---|
| pack-priv static <T extends @Nullable Object> T[] toArrayImpl(@Nullable Object[] src, int offset, int len, T[] dst) Implementation of If the collection fits in the specified array with room to spare (i.e., the array has more
elements than the collection), the element in the array immediately following the end of the
collection is set to | |
| toArrayImpl | back to summary |
|---|---|
| pack-priv static @Nullable Object[] toArrayImpl(Collection<?> c) Returns an array containing all of the elements in the specified collection. This method returns the elements in the order they are returned by the collection's iterator. The returned array is "safe" in that no references to it are maintained by the collection. The caller is thus free to modify the returned array. This method assumes that the collection size doesn't change while the method is running. TODO(kevinb): support concurrently modified collections?
| |