public class ArrayUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ArrayUtils.IterableWrapper<T> |
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Collection<T> |
addArray(Collection<T> v,
T[] array) |
static <T> T[] |
addToArray(T[] array,
T... objects) |
static <T> Iterable<T> |
asIterable(Iterator<T> iterator) |
static Collection<Character> |
asList(char[] toCharArray) |
static <T> List<T> |
asList(T[] values) |
static <T> List<T> |
combine(List<T> list1,
List<T> list2) |
static <T> T[] |
combine(T[] a,
T[] b) |
static <T> T[] |
combine(T a,
T... b) |
static List |
combineResults(Object[] array,
Method method) |
static List<?> |
combineResults(Object[] array,
String invokeMethod) |
static boolean |
contains(int[] values,
int value) |
static <T> boolean |
contains(T[] values,
T value) |
static <V> int |
count(V matching,
Collection<V> values) |
static <K,V> int |
countValues(HashMap<K,V> out,
V matching) |
static <K,T> T |
getDefault(HashMap<K,T> map,
K key,
T defaultValue) |
static <H,T extends H> |
getFirst(Collection<T> array,
Comparator<H> sorter) |
static <T> T |
getFirst(T[] array) |
static <H,T extends H> |
getFirst(T[] array,
Comparator<H> compartor) |
static <T> T |
getLast(Collection<T> array,
Comparator<T> sorter) |
static <T> T |
getLast(List<T> list) |
static <T> T |
getLast(T[] array) |
static <T> T |
getLast(T[] array,
Comparator<T> sorter) |
static <KEY,VALUES,SPECIFIC_VALUE extends VALUES> |
getOrElse(Map<KEY,VALUES> fields,
KEY key,
Function0<SPECIFIC_VALUE> defaultIfNotFound) |
static <T> T |
getSingleton(T[] parts) |
static <T> T[] |
getSubsection(T[] array,
int startInclusive,
int endExclusive) |
static boolean |
isEmpty(Collection<?> collection) |
static boolean |
isEmpty(Object[] array) |
static <T> T[] |
of(T valueOfEachElement,
int sizeOfArray) |
static <T> T[] |
toArray(List<T> list) |
static <T> T[] |
toArray(List<T> list,
Class<T> type) |
static <T> T[] |
toReverseArray(T[] array) |
static Vector<Object> |
toReverseVector(Vector<Object> vector)
Deprecated.
for removal in 16.0.0
|
static <T> String |
toString(Iterable<T> values,
Function1<T,String> formatter) |
static <T> String |
toString(T[] values,
Function1<T,String> formatter) |
public static <T> Collection<T> addArray(Collection<T> v, T[] array)
public static <T> List<T> asList(T[] values)
@Deprecated public static Vector<Object> toReverseVector(Vector<Object> vector)
public static <T> T[] toReverseArray(T[] array)
public static <T> T[] addToArray(T[] array,
T... objects)
public static <T> T[] getSubsection(T[] array,
int startInclusive,
int endExclusive)
public static boolean isEmpty(Object[] array)
public static boolean isEmpty(Collection<?> collection)
public static <T> T getSingleton(T[] parts)
public static <T> T getFirst(T[] array)
public static <H,T extends H> T getFirst(T[] array,
Comparator<H> compartor)
public static <H,T extends H> T getFirst(Collection<T> array, Comparator<H> sorter)
public static <T> T getLast(T[] array)
public static <T> T getLast(T[] array,
Comparator<T> sorter)
public static <T> T getLast(Collection<T> array, Comparator<T> sorter)
public static <T> T[] combine(T[] a,
T[] b)
public static <T> T[] combine(T a,
T... b)
public static <T> boolean contains(T[] values,
T value)
public static boolean contains(int[] values,
int value)
public static <T> T getLast(List<T> list)
public static <K,T> T getDefault(HashMap<K,T> map, K key, T defaultValue)
public static <K,V> int countValues(HashMap<K,V> out, V matching)
public static <V> int count(V matching,
Collection<V> values)
public static <T> T[] toArray(List<T> list)
public static <KEY,VALUES,SPECIFIC_VALUE extends VALUES> SPECIFIC_VALUE getOrElse(Map<KEY,VALUES> fields, KEY key, Function0<SPECIFIC_VALUE> defaultIfNotFound)
public static Collection<Character> asList(char[] toCharArray)
public static <T> T[] of(T valueOfEachElement,
int sizeOfArray)
Copyright © 2022. All rights reserved.