Class Iterator2Collection<T>

java.lang.Object
com.ibm.wala.util.collections.Iterator2Collection<T>
All Implemented Interfaces:
Iterable<T>, Collection<T>
Direct Known Subclasses:
Iterator2List, Iterator2Set

public abstract class Iterator2Collection<T> extends Object implements Collection<T>
Converts an Iterator to a Collection. Note that if you just want to use Java 5's for-each loop with an Iterator, use Iterator2Iterable.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(T arg0)
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    addAll(Collection<? extends T> arg0)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    protected abstract Collection<T>
     
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    remove(Object arg0)
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Deprecated, for removal: This API element is subject to removal in a future version.
    <U> U[]
    toArray(U[] a)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static <T> List<T>
    toList(Iterator<? extends T> i)
    Returns a List containing all elements in i, preserving duplicates.
    static <T> Set<T>
    toSet(Iterator<? extends T> i)
    Returns a Set containing all elements in i.
    Deprecated, for removal: This API element is subject to removal in a future version.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface Collection

    parallelStream, removeIf, spliterator, stream, toArray

    Methods inherited from interface Iterable

    forEach