Package org.apache.arrow.util
Class Collections2
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 ofmap
to 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 aList
from the elements remaining in iterator.static String
Creates a human readable string from the remaining elements in iterator.
-
Method Details
-
toList
Creates aList
from the elements remaining in iterator. -
toList
Converts the iterable into a newList
. -
toImmutableList
Converts the iterable into a new immutableList
. -
immutableMapCopy
Copies the elements ofmap
to 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[])
-