Class IteratorCollection

java.lang.Object
org.apache.jena.util.IteratorCollection

@Deprecated(forRemoval=true) public class IteratorCollection extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use Iter.toList(Iterator) and Iter.toSet(Iterator)
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> List<T>
    iteratorToList(Iterator<? extends T> it)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Answer the elements of the given iterator as a list, in the order that they arrived from the iterator.
    static <T> Set<T>
    iteratorToSet(Iterator<? extends T> i)
    Deprecated, for removal: This API element is subject to removal in a future version.
    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 Details

    • iteratorToSet

      public static <T> Set<T> iteratorToSet(Iterator<? extends T> i)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 <T> List<T> iteratorToList(Iterator<? extends T> it)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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