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