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

## com.hp.hpl.jena.util
Class IteratorCollection

    java.lang.Object
      com.hp.hpl.jena.util.IteratorCollection

    public class IteratorCollection

extends java.lang.Object

Author:
  hedgehog

Method Summary
`static java.util.List` | `iteratorToList(java.util.Iterator it)` Answer the elements of the given iterator as a list, in the order that they arrived from the iterator.
`static java.util.Set` | `iteratorToSet(java.util.Iterator i)` Answer the elements of the given iterator as a set.

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

Method Detail

### iteratorToSet

    public static java.util.Set iteratorToSet(java.util.Iterator i)

  Answer the elements of the given iterator as a set. The iterator is consumed by the operation. Even if an exception is thrown, the iterator will be closed.

  Parameters:
    `i` - the iterator to convert
  Returns:
    A set of the members of i

### iteratorToList

    public static java.util.List iteratorToList(java.util.Iterator it)

  Answer the elements of the given iterator as a list, in the order that they arrived from the iterator. The iterator is consumed by this operation: even if an exception is thrown, the iterator will be closed.

  Parameters:
    `it` - the iterator to convert
  Returns:
    a list of the elements of `it`, in order

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 © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP