public class CollectionUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CollectionUtils.EmptyEnumeration
An empty enumeration.
|
Modifier and Type | Field and Description |
---|---|
static java.util.List |
EMPTY_LIST
Collections.emptyList() is Java5+.
|
Constructor and Description |
---|
CollectionUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Enumeration |
append(java.util.Enumeration e1,
java.util.Enumeration e2)
Append one enumeration to another.
|
static java.util.Collection |
asCollection(java.util.Iterator iter)
Returns a collection containing all elements of the iterator.
|
static java.util.Enumeration |
asEnumeration(java.util.Iterator iter)
Adapt the specified Iterator to the Enumeration interface.
|
static java.util.Iterator |
asIterator(java.util.Enumeration e)
Adapt the specified Enumeration to the Iterator interface.
|
static boolean |
equals(java.util.Dictionary d1,
java.util.Dictionary d2)
Deprecated.
since 1.6.x.
|
static boolean |
equals(java.util.Vector v1,
java.util.Vector v2)
Deprecated.
since 1.6.x.
|
static java.lang.String |
flattenToString(java.util.Collection c)
Creates a comma separated list of all values held in the given
collection.
|
static int |
frequency(java.util.Collection c,
java.lang.Object o)
Counts how often the given Object occurs in the given
collection using equals() for comparison.
|
static void |
putAll(java.util.Dictionary m1,
java.util.Dictionary m2)
Deprecated.
since 1.6.x.
|
public static final java.util.List EMPTY_LIST
public static boolean equals(java.util.Vector v1, java.util.Vector v2)
v1
- the first vector.v2
- the second vector.public static boolean equals(java.util.Dictionary d1, java.util.Dictionary d2)
Follows the equals contract of Java 2's Map.
d1
- the first directory.d2
- the second directory.public static java.lang.String flattenToString(java.util.Collection c)
public static void putAll(java.util.Dictionary m1, java.util.Dictionary m2)
m1
- the to directory.m2
- the from directory.public static java.util.Enumeration append(java.util.Enumeration e1, java.util.Enumeration e2)
e1
- the first enumeration.e2
- the subsequent enumeration.public static java.util.Enumeration asEnumeration(java.util.Iterator iter)
iter
- the Iterator to adapt.public static java.util.Iterator asIterator(java.util.Enumeration e)
e
- the Enumeration to adapt.public static java.util.Collection asCollection(java.util.Iterator iter)
public static int frequency(java.util.Collection c, java.lang.Object o)