public final class Iterators extends Object
Iterator
and Enumeration
utilities.Modifier and Type | Field and Description |
---|---|
static Iterator |
EMPTY_ITERATOR
An empty Iterator
|
Constructor and Description |
---|
Iterators() |
Modifier and Type | Method and Description |
---|---|
static Iterator |
forEnumeration(Enumeration enumeration)
Return an Iterator wrapper for the given Enumeration
|
static Iterator |
makeImmutable(Iterator iter)
Make an Iterator immutable
|
static Enumeration |
makeSynchronized(Enumeration enumeration)
Returns a synchronized version of the given Enumeration.
|
static Iterator |
makeSynchronized(Iterator iter)
Returns a synchronized version of the given Iterator.
|
static Enumeration |
toEnumeration(Iterator iter)
Return an Enumeration for the given Iterator.
|
static String |
toString(Iterator iter)
Return a comma delimited string representation of all of the elements
in the given Iterator.
|
static String |
toString(Iterator iter,
String delim)
Return a delimited string representation of all of the elements
in the given Iterator.
|
static Iterator |
union(Iterator[] iters)
Returns an Iterator containing the union of all of the elements
in the given iterator array.
|
public static final Iterator EMPTY_ITERATOR
public static Iterator forEnumeration(Enumeration enumeration)
enumeration
- Enumeration to wrappublic static Enumeration toEnumeration(Iterator iter)
iter
- Iterator to wrap.public static Iterator makeImmutable(Iterator iter)
iter
- Iterator to make immutablepublic static Iterator makeSynchronized(Iterator iter)
iter
- Iterator to synchronize.public static Enumeration makeSynchronized(Enumeration enumeration)
enumeration
- Enumeration to synchronize.public static Iterator union(Iterator[] iters)
iters
- Array of iterators.public static String toString(Iterator iter, String delim)
iter
- Iterator to convert to string.delim
- Elemement delimiter.Copyright © 2018 JBoss by Red Hat. All rights reserved.