Package com.google.common.collect
Class LinkedListMultimap.ValueForKeyIterator
java.lang.Object
com.google.common.collect.LinkedListMultimap.ValueForKeyIterator
- All Implemented Interfaces:
Iterator<V>,ListIterator<V>
- Enclosing class:
- LinkedListMultimap<K,
V>
A
ListIterator over values for a specified key.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) LinkedListMultimap.Node<K,V> (package private) final K(package private) LinkedListMultimap.Node<K,V> (package private) int(package private) LinkedListMultimap.Node<K,V> -
Constructor Summary
ConstructorsConstructorDescriptionValueForKeyIterator(K key) Constructs a new iterator over all values for the specified key.ValueForKeyIterator(K key, int index) Constructs a new iterator over all values for the specified key starting at the specified index. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
key
-
nextIndex
int nextIndex -
next
-
current
-
previous
-
-
Constructor Details
-
ValueForKeyIterator
ValueForKeyIterator(K key) Constructs a new iterator over all values for the specified key. -
ValueForKeyIterator
Constructs a new iterator over all values for the specified key starting at the specified index. This constructor is optimized so that it starts at either the head or the tail, depending on which is closer to the specified index. This allows adds to the tail to be done in constant time.- Throws:
IndexOutOfBoundsException- if index is invalid
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceListIterator<V>
-
previous
- Specified by:
previousin interfaceListIterator<V>
-
nextIndex
public int nextIndex()- Specified by:
nextIndexin interfaceListIterator<V>
-
previousIndex
public int previousIndex()- Specified by:
previousIndexin interfaceListIterator<V>
-
remove
public void remove() -
set
- Specified by:
setin interfaceListIterator<V>
-
add
- Specified by:
addin interfaceListIterator<V>
-