Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.util.collection
Class Iterators

    java.lang.Object
      org.jboss.util.collection.Iterators

public final class Iterators
extends Object

A collection of `Iterator` and `Enumeration` utilities.

Version:
  `$Revision: 1.3 $`
Author:
  Jason Dillon

Field Summary
`static Iterator` | `EMPTY_ITERATOR` An empty Iterator

Constructor Summary
`Iterators()`

Method Summary
`static Iterator` | `forEnumeration(Enumeration enum)` Return an Iterator wrapper for the given Enumeration
`static Iterator` | `makeImmutable(Iterator iter)` Make an Iterator immutable
`static Enumeration` | `makeSynchronized(Enumeration enum)` 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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMPTY_ITERATOR

    public static final Iterator EMPTY_ITERATOR

  An empty Iterator

Constructor Detail

### Iterators

    public Iterators()

Method Detail

### forEnumeration

    public static Iterator forEnumeration(Enumeration enum)

  Return an Iterator wrapper for the given Enumeration

  Parameters:
    `enum` - Enumeration to wrap
  Returns:
    Enumeration wrapped as an Iterator

### toEnumeration

    public static Enumeration toEnumeration(Iterator iter)

  Return an Enumeration for the given Iterator.

  Parameters:
    `iter` - Iterator to wrap.
  Returns:
    Enumeration wrapper.

### makeImmutable

    public static Iterator makeImmutable(Iterator iter)

  Make an Iterator immutable

  Parameters:
    `iter` - Iterator to make immutable
  Returns:
    Imutable iterator

### makeSynchronized

    public static Iterator makeSynchronized(Iterator iter)

  Returns a synchronized version of the given Iterator.

  Parameters:
    `iter` - Iterator to synchronize.
  Returns:
    Synchronized Iterator.

### makeSynchronized

    public static Enumeration makeSynchronized(Enumeration enum)

  Returns a synchronized version of the given Enumeration.

  Parameters:
    `enum` - Enumeration to synchronize.
  Returns:
    Synchronized Enumeration.

### union

    public static Iterator union(Iterator[] iters)

  Returns an Iterator containing the union of all of the elements in the given iterator array.

  Parameters:
    `iters` - Array of iterators.
  Returns:
    Iterator containing the union.

### toString

    public static String toString(Iterator iter,
                                  String delim)

  Return a delimited string representation of all of the elements in the given Iterator.

  Parameters:
    `iter` - Iterator to convert to string.
    `delim` - Elemement delimiter.
  Returns:
    Delimited string value.

### toString

    public static String toString(Iterator iter)

  Return a comma delimited string representation of all of the elements in the given Iterator.

  Parameters:
    `iter` - Iterator to convert to string.
  Returns:
    Delimited string value.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.