## Uses of Interface
java.util.Iterator

- Packages that use Iterator
  Package | Description
  --- | ---
  java.lang |
  java.util |
  java.util.concurrent | Utility classes commonly useful in concurrent programming.
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- - ### Uses of Iterator in java.lang

    Methods in java.lang that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<T>` | Iterable.`iterator()` Returns an iterator over elements of type `T`.

  - ### Uses of Iterator in java.util

    Subinterfaces of Iterator in java.util
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `ListIterator<E>` An iterator for lists that allows the programmer to traverse the list in either direction, modify the list during iteration, and obtain the iterator's current position in the list.
    `interface` | `PrimitiveIterator<T,T_CONS>` A base type for primitive specializations of `Iterator`.
    `static interface` | `PrimitiveIterator.OfDouble` An Iterator specialized for `double` values.
    `static interface` | `PrimitiveIterator.OfInt` An Iterator specialized for `int` values.
    `static interface` | `PrimitiveIterator.OfLong` An Iterator specialized for `long` values.

    Methods in java.util that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<E>` | TreeSet.`descendingIterator()` Returns an iterator over the elements in this set in descending order.
    `Iterator<E>` | NavigableSet.`descendingIterator()` Returns an iterator over the elements in this set, in descending order.
    `Iterator<E>` | LinkedList.`descendingIterator()`
    `Iterator<E>` | Deque.`descendingIterator()` Returns an iterator over the elements in this deque in reverse sequential order.
    `Iterator<E>` | ArrayDeque.`descendingIterator()`
    `static <T> Iterator<T>` | Collections.`emptyIterator()` Returns an iterator that has no elements.
    `Iterator<E>` | Vector.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `Iterator<E>` | TreeSet.`iterator()` Returns an iterator over the elements in this set in ascending order.
    `Iterator<E>` | Set.`iterator()` Returns an iterator over the elements in this set.
    `Iterator<S>` | ServiceLoader.`iterator()` Lazily loads the available providers of this loader's service.
    `Iterator<E>` | PriorityQueue.`iterator()` Returns an iterator over the elements in this queue.
    `Iterator<E>` | NavigableSet.`iterator()` Returns an iterator over the elements in this set, in ascending order.
    `Iterator<E>` | List.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `Iterator<E>` | HashSet.`iterator()` Returns an iterator over the elements in this set.
    `Iterator<E>` | Deque.`iterator()` Returns an iterator over the elements in this deque in proper sequence.
    `Iterator<E>` | Collection.`iterator()` Returns an iterator over the elements in this collection.
    `Iterator<E>` | ArrayList.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `Iterator<E>` | ArrayDeque.`iterator()` Returns an iterator over the elements in this deque.
    `Iterator<E>` | AbstractSequentialList.`iterator()` Returns an iterator over the elements in this list (in proper sequence).
    `Iterator<E>` | AbstractList.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `abstract Iterator<E>` | AbstractCollection.`iterator()` Returns an iterator over the elements contained in this collection.
    `static <T> Iterator<T>` | Spliterators.`iterator(Spliterator<? extends T> spliterator)` Creates an `Iterator` from a `Spliterator`.

    Methods in java.util with parameters of type Iterator
    Modifier and Type | Method and Description
    --- | ---
    `static <T> Spliterator<T>` | Spliterators.`spliterator(Iterator<? extends T> iterator, long size, int characteristics)` Creates a `Spliterator` using a given `Iterator` as the source of elements, and with a given initially reported size.
    `static <T> Spliterator<T>` | Spliterators.`spliteratorUnknownSize(Iterator<? extends T> iterator, int characteristics)` Creates a `Spliterator` using a given `Iterator` as the source of elements, with no initial size estimate.

  - ### Uses of Iterator in java.util.concurrent

    Methods in java.util.concurrent that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<E>` | LinkedBlockingDeque.`descendingIterator()` Returns an iterator over the elements in this deque in reverse sequential order.
    `Iterator<E>` | ConcurrentSkipListSet.`descendingIterator()` Returns an iterator over the elements in this set in descending order.
    `Iterator<E>` | ConcurrentLinkedDeque.`descendingIterator()` Returns an iterator over the elements in this deque in reverse sequential order.
    `Iterator<E>` | SynchronousQueue.`iterator()` Returns an empty iterator in which `hasNext` always returns `false`.
    `Iterator<E>` | PriorityBlockingQueue.`iterator()` Returns an iterator over the elements in this queue.
    `Iterator<E>` | LinkedTransferQueue.`iterator()` Returns an iterator over the elements in this queue in proper sequence.
    `Iterator<E>` | LinkedBlockingQueue.`iterator()` Returns an iterator over the elements in this queue in proper sequence.
    `Iterator<E>` | LinkedBlockingDeque.`iterator()` Returns an iterator over the elements in this deque in proper sequence.
    `Iterator<E>` | DelayQueue.`iterator()` Returns an iterator over all the elements (both expired and unexpired) in this queue.
    `Iterator<E>` | CopyOnWriteArraySet.`iterator()` Returns an iterator over the elements contained in this set in the order in which these elements were added.
    `Iterator<E>` | CopyOnWriteArrayList.`iterator()` Returns an iterator over the elements in this list in proper sequence.
    `Iterator<E>` | ConcurrentSkipListSet.`iterator()` Returns an iterator over the elements in this set in ascending order.
    `Iterator<E>` | ConcurrentLinkedQueue.`iterator()` Returns an iterator over the elements in this queue in proper sequence.
    `Iterator<E>` | ConcurrentLinkedDeque.`iterator()` Returns an iterator over the elements in this deque in proper sequence.
    `Iterator<E>` | BlockingDeque.`iterator()` Returns an iterator over the elements in this deque in proper sequence.
    `Iterator<E>` | ArrayBlockingQueue.`iterator()` Returns an iterator over the elements in this queue in proper sequence.

  - ### Uses of Iterator in java.util.stream

    Methods in java.util.stream that return Iterator
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<T>` | BaseStream.`iterator()` Returns an iterator for the elements of this stream.

Copyright © 2025 API Design. All Rights Reserved.