Lines Matching full:iterator
33 import java.util.Iterator;
232 if (!values.iterator().hasNext()) {
268 Iterator<? extends V> iterator = values.iterator();
269 if (!iterator.hasNext()) {
280 while (iterator.hasNext()) {
281 if (collection.add(iterator.next())) {
480 @Override public Iterator<V> iterator() {
485 /** Collection iterator for {@code WrappedCollection}. */
486 class WrappedIterator implements Iterator<V> {
487 final Iterator<V> delegateIterator;
494 WrappedIterator(Iterator<V> delegateIterator) {
499 * If the delegate changed since the iterator was created, the iterator is
525 Iterator<V> getDelegateIterator() {
623 private Iterator<V> iteratorOrListIterator(Collection<V> collection) {
626 : collection.iterator();
852 @Override public Iterator<K> iterator() {
853 return new Iterator<K>() {
854 final Iterator<Map.Entry<K, Collection<V>>> entryIterator
855 = subMap.entrySet().iterator();
974 Iterator<V> iterator = collection.iterator();
976 iterator.next();
977 iterator.remove();
995 @Override public Iterator<Multiset.Entry<K>> iterator() {
1022 @Override public Iterator<K> iterator() {
1071 /** Iterator across each key, repeating once per value. */
1072 private class MultisetEntryIterator implements Iterator<Multiset.Entry<K>> {
1073 final Iterator<Map.Entry<K, Collection<V>>> asMapIterator
1074 = asMap().entrySet().iterator();
1101 /** Iterator across each key, repeating once per value. */
1102 private class MultisetKeyIterator implements Iterator<K> {
1103 final Iterator<Map.Entry<K, V>> entryIterator = entries().iterator();
1121 * <p>The iterator generated by the returned collection traverses the values
1130 @Override public Iterator<V> iterator() {
1148 /** Iterator across all values. */
1149 private class ValueIterator implements Iterator<V> {
1150 final Iterator<Map.Entry<K, V>> entryIterator = createEntryIterator();
1172 * <p>The iterator generated by the returned collection traverses the values
1177 * collection or its iterator.
1191 @Override public Iterator<Map.Entry<K, V>> iterator() {
1222 * Returns an iterator across all key-value map entries, used by {@code
1223 * entries().iterator()} and {@code values().iterator()}. The default
1227 * @return an iterator across map entries
1229 Iterator<Map.Entry<K, V>> createEntryIterator() {
1233 /** Iterator across all key-value pairs. */
1234 private class EntryIterator implements Iterator<Map.Entry<K, V>> {
1235 final Iterator<Map.Entry<K, Collection<V>>> keyIterator;
1238 Iterator<V> valueIterator;
1241 keyIterator = map.entrySet().iterator();
1253 valueIterator = collection.iterator();
1362 @Override public Iterator<Map.Entry<K, Collection<V>>> iterator() {
1386 /** Iterator across all keys and value collections. */
1387 class AsMapIterator implements Iterator<Map.Entry<K, Collection<V>>> {
1388 final Iterator<Map.Entry<K, Collection<V>>> delegateIterator
1389 = submap.entrySet().iterator();