|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.util.CollectionUtils
public class CollectionUtils
A set of helper methods related to collection manipulation.
Nested Class Summary | |
---|---|
static class |
CollectionUtils.EmptyEnumeration<E>
An empty enumeration. |
Field Summary | |
---|---|
static java.util.List |
EMPTY_LIST
Deprecated. |
Constructor Summary | |
---|---|
CollectionUtils()
|
Method Summary | ||
---|---|---|
static
|
append(java.util.Enumeration<E> e1,
java.util.Enumeration<E> e2)
Append one enumeration to another. |
|
static
|
asCollection(java.util.Iterator<? extends T> iter)
Returns a collection containing all elements of the iterator. |
|
static
|
asEnumeration(java.util.Iterator<E> iter)
Adapt the specified Iterator to the Enumeration interface. |
|
static
|
asIterator(java.util.Enumeration<E> 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
|
putAll(java.util.Dictionary<? super K,? super V> m1,
java.util.Dictionary<? extends K,? extends V> m2)
Deprecated. since 1.6.x. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final java.util.List EMPTY_LIST
Constructor Detail |
---|
public CollectionUtils()
Method Detail |
---|
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 <K,V> void putAll(java.util.Dictionary<? super K,? super V> m1, java.util.Dictionary<? extends K,? extends V> m2)
m1
- the to directory.m2
- the from directory.public static <E> java.util.Enumeration<E> append(java.util.Enumeration<E> e1, java.util.Enumeration<E> e2)
e1
- the first enumeration.e2
- the subsequent enumeration.
public static <E> java.util.Enumeration<E> asEnumeration(java.util.Iterator<E> iter)
iter
- the Iterator to adapt.
public static <E> java.util.Iterator<E> asIterator(java.util.Enumeration<E> e)
e
- the Enumeration to adapt.
public static <T> java.util.Collection<T> asCollection(java.util.Iterator<? extends T> iter)
public static int frequency(java.util.Collection<?> c, java.lang.Object o)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |