Package org.spockframework.util
Class CollectionUtil
java.lang.Object
org.spockframework.util.CollectionUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidaddLastElement(List<T> list, T element) arrayToList(Object array) static <T> Set<T> asSet(T[] values) static <T> Iterable<T> static <T> Iterable<T> static booleancontainsAny(Iterable<?> iterable, Object... elements) static Object[](Partial) replacement for Arrays.copyOfRange, which is only available in JDK6.static <E,F> ArrayList <F> filterMap(Collection<E> collection, IFunction<? super E, ? extends F> function) static MapfilterNullValues(Map map) static <T> intfindIndexOf(Iterable<T> iterable, IFunction<? super T, Boolean> predicate) static <T> TgetFirstElement(Iterable<T> iterable) static <T> TgetLastElement(List<T> list) static <E> List<E> listOf(E... elements) static <K,V> Map <K, V> mapOf(K key, V value) static <K,V> Map <K, V> mapOf(K key, V value, K key2, V value2) static <K,V> Map <K, V> mapOf(K key, V value, K key2, V value2, K key3, V value3) static <K,V> Map <K, V> mapOf(K key, V value, K key2, V value2, K key3, V value3, K key4, V value4) static <K,V> Map <K, V> mapOf(K key, V value, K key2, V value2, K key3, V value3, K key4, V value4, K key5, V value5) static Mapstatic <T> Iterable<T> static <T> voidsetLastElement(List<T> list, T elem)
-
Constructor Details
-
CollectionUtil
public CollectionUtil()
-
-
Method Details
-
filterMap
public static <E,F> ArrayList<F> filterMap(Collection<E> collection, IFunction<? super E, ? extends F> function) -
copyArray
(Partial) replacement for Arrays.copyOfRange, which is only available in JDK6. -
arrayToList
-
getFirstElement
-
getLastElement
-
setLastElement
-
addLastElement
-
reverse
-
asSet
-
listOf
-
mapOf
-
mapOf
-
mapOf
-
mapOf
public static <K,V> Map<K,V> mapOf(K key, V value, K key2, V value2, K key3, V value3, K key4, V value4) -
mapOf
public static <K,V> Map<K,V> mapOf(K key, V value, K key2, V value2, K key3, V value3, K key4, V value4, K key5, V value5) -
filterNullValues
-
putAll
-
concat
-
concat
-
containsAny
-
findIndexOf
-