Can't rename protected instance variable
- Javadoc: Better @link
This commit is contained in:
parent
2790d5c267
commit
d3271b9b3f
|
@ -94,7 +94,7 @@ public class LoopingIterator<E> implements ResettableIterator<E> {
|
|||
* Removes the previously retrieved item from the underlying collection.
|
||||
* <p>
|
||||
* This feature is only supported if the underlying collection's
|
||||
* {@link Collection#iterator iterator} method returns an implementation
|
||||
* {@link Collection#iterator()} method returns an implementation
|
||||
* that supports it.
|
||||
* <p>
|
||||
* This method can only be called after at least one {@link #next} method call.
|
||||
|
|
|
@ -206,7 +206,7 @@ public class LoopingListIterator<E> implements ResettableListIterator<E> {
|
|||
* Removes the previously retrieved item from the underlying list.
|
||||
* <p>
|
||||
* This feature is only supported if the underlying list's
|
||||
* {@link List#iterator iterator} method returns an implementation
|
||||
* {@link List#iterator()} method returns an implementation
|
||||
* that supports it.
|
||||
* <p>
|
||||
* This method can only be called after at least one {@link #next}
|
||||
|
|
|
@ -54,7 +54,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
|
|||
/**
|
||||
* The source Iterator.
|
||||
*/
|
||||
protected final Iterator<Map.Entry<E, MutableInteger>> iterator;
|
||||
protected final Iterator<Map.Entry<E, MutableInteger>> decorated;
|
||||
|
||||
/** The last returned entry */
|
||||
protected Entry<E> last;
|
||||
|
@ -64,23 +64,23 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
|
|||
|
||||
/**
|
||||
* Constructs a new instance.
|
||||
* @param iterator the iterator to decorate
|
||||
* @param decorated the iterator to decorate
|
||||
* @param parent the parent multiset
|
||||
*/
|
||||
protected EntrySetIterator(final Iterator<Map.Entry<E, MutableInteger>> iterator,
|
||||
protected EntrySetIterator(final Iterator<Map.Entry<E, MutableInteger>> decorated,
|
||||
final AbstractMapMultiSet<E> parent) {
|
||||
this.iterator = iterator;
|
||||
this.decorated = decorated;
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return iterator.hasNext();
|
||||
return decorated.hasNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entry<E> next() {
|
||||
last = new MultiSetEntry<>(iterator.next());
|
||||
last = new MultiSetEntry<>(decorated.next());
|
||||
canRemove = true;
|
||||
return last;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
|
|||
if (!canRemove) {
|
||||
throw new IllegalStateException("Iterator remove() can only be called once after next()");
|
||||
}
|
||||
iterator.remove();
|
||||
decorated.remove();
|
||||
last = null;
|
||||
canRemove = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue