java.lang.Object
org.apache.arrow.util.Collections2
Utility methods for manipulating
Collections and their
subclasses/implementations.-
Method Summary
Modifier and TypeMethodDescriptionstatic <V> List<V>asImmutableList(V... values) Copies the values to a new unmodifiable list.static <V> List<V>immutableListCopy(List<V> list) Copies the elements of list to a new unmodifiable list.static <K,V> Map<K, V> immutableMapCopy(Map<K, V> map) Copies the elements ofmapto a new unmodifiable map.static <T> List<T>toImmutableList(Iterable<T> iterable) Converts the iterable into a new immutableList.static <T> List<T>Converts the iterable into a newList.static <T> List<T>Creates aListfrom the elements remaining in iterator.static StringCreates a human readable string from the remaining elements in iterator.
-
Method Details
-
toList
Creates aListfrom the elements remaining in iterator. -
toList
Converts the iterable into a newList. -
toImmutableList
Converts the iterable into a new immutableList. -
immutableMapCopy
Copies the elements ofmapto a new unmodifiable map. -
immutableListCopy
Copies the elements of list to a new unmodifiable list. -
asImmutableList
Copies the values to a new unmodifiable list. -
toString
Creates a human readable string from the remaining elements in iterator.The output should be similar to
Arrays#toString(Object[])
-