public class CollectionUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static AttributeMap<java.lang.Object> |
EMPTY_ATTRIBUTE_MAP
The shared, singleton empty attribute map instance.
|
static java.util.Iterator |
EMPTY_ITERATOR
The shared, singleton empty iterator instance.
|
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
addAllNoDuplicates(java.util.List<T> target,
T... objects)
Add all given objects to given target list.
|
static <E> java.util.Iterator<E> |
emptyIterator() |
static <V> AttributeMap<V> |
singleEntryMap(java.lang.String attributeName,
V attributeValue)
Factory method that returns a unmodifiable attribute map with a single entry.
|
static <E> java.util.Iterator<E> |
toIterator(java.util.Enumeration<E> enumeration)
Factory method that adapts an enumeration to an iterator.
|
public static final java.util.Iterator EMPTY_ITERATOR
public static final AttributeMap<java.lang.Object> EMPTY_ATTRIBUTE_MAP
public static <E> java.util.Iterator<E> emptyIterator()
public static <E> java.util.Iterator<E> toIterator(java.util.Enumeration<E> enumeration)
enumeration
- the enumerationpublic static <V> AttributeMap<V> singleEntryMap(java.lang.String attributeName, V attributeValue)
attributeName
- the attribute nameattributeValue
- the attribute valuepublic static <T> boolean addAllNoDuplicates(java.util.List<T> target, T... objects)
target
- the collection to which to objects will be addedobjects
- the objects to add