org.xerial.util
Class CollectionUtil
java.lang.Object
org.xerial.util.CollectionUtil
public class CollectionUtil
- extends Object
|
Method Summary |
static
|
collect(In[] collection,
Functor<In> functor)
|
static
|
collect(Iterable<In> collection,
Functor<In> functor)
|
static
|
collect(Map<K,V> map,
BinaryFunctor<K,V> functor)
|
static
|
collectFromNonGenericCollection(Iterable collection,
Functor<In> functor)
|
static
|
displayMap(Map<K,V> map,
String keyValueSeparator,
String elementSeparator)
|
static
|
select(Iterable<In> collection,
Predicate<In> filter)
|
static
|
sort(Collection<E> collection)
|
static
|
toList(E[] array)
Converts an array into a list |
static
|
toString(Collection<In> collection)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toString
public static <In> List<String> toString(Collection<In> collection)
collectFromNonGenericCollection
public static <In> List collectFromNonGenericCollection(Iterable collection,
Functor<In> functor)
select
public static <In> List<In> select(Iterable<In> collection,
Predicate<In> filter)
collect
public static <In> List collect(Iterable<In> collection,
Functor<In> functor)
collect
public static <In> List collect(In[] collection,
Functor<In> functor)
collect
public static <K,V> List collect(Map<K,V> map,
BinaryFunctor<K,V> functor)
displayMap
public static <K,V> String displayMap(Map<K,V> map,
String keyValueSeparator,
String elementSeparator)
sort
public static <E> TreeSet<E> sort(Collection<E> collection)
toList
public static <E> List<E> toList(E[] array)
- Converts an array into a list
- Type Parameters:
E - - Parameters:
array -
- Returns:
- list representation of a given array

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.