public final class CollectionsUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CollectionsUtil.IteratorToEnumeration<T>
Convert an iterator to an enumeration.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
addAll(Collection<T> col,
Enumeration<T> e)
Add all elements of the given enumeration into the given collection.
|
static <T> Enumeration<T> |
enumeration(Iterator<T> iterator)
Instantiate an IteratorToEnumeration on the given iterator.
|
static boolean |
equals(List<?> list1,
List<?> list2)
Return true of the 2 lists are identical.
|
static <T> Iterable<T> |
iterable(Enumeration<T> enumeration)
Create an Iterable from the enumeration, by filling a LinkedList with the elements in the enumeration.
|
static <T> Iterator<T> |
iterator(Enumeration<T> enumeration)
Create an Iterator from an Enumeration.
|
static <T> Iterable<T> |
singleTimeIterable(Enumeration<T> enumeration)
Create an Iterable from an Enumeration, but avoiding to create a list, so the Iterable can be iterated only once.
|
public static <T> Enumeration<T> enumeration(Iterator<T> iterator)
public static <T> Iterable<T> iterable(Enumeration<T> enumeration)
public static <T> Iterator<T> iterator(Enumeration<T> enumeration)
public static <T> Iterable<T> singleTimeIterable(Enumeration<T> enumeration)
public static boolean equals(List<?> list1, List<?> list2)
ObjectUtil.equalsOrNull(Object, Object) is used.public static <T> void addAll(Collection<T> col, Enumeration<T> e)
Copyright © 2018. All rights reserved.