Can't rename protected instance variable

- Javadoc: Better @link
This commit is contained in:
Gary Gregory 2024-08-25 18:24:09 -04:00
parent 2790d5c267
commit d3271b9b3f
3 changed files with 9 additions and 9 deletions

View File

@ -94,7 +94,7 @@ public class LoopingIterator<E> implements ResettableIterator<E> {
* Removes the previously retrieved item from the underlying collection. * Removes the previously retrieved item from the underlying collection.
* <p> * <p>
* This feature is only supported if the underlying collection's * 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. * that supports it.
* <p> * <p>
* This method can only be called after at least one {@link #next} method call. * This method can only be called after at least one {@link #next} method call.

View File

@ -206,7 +206,7 @@ public class LoopingListIterator<E> implements ResettableListIterator<E> {
* Removes the previously retrieved item from the underlying list. * Removes the previously retrieved item from the underlying list.
* <p> * <p>
* This feature is only supported if the underlying list's * 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. * that supports it.
* <p> * <p>
* This method can only be called after at least one {@link #next} * This method can only be called after at least one {@link #next}

View File

@ -54,7 +54,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
/** /**
* The source Iterator. * The source Iterator.
*/ */
protected final Iterator<Map.Entry<E, MutableInteger>> iterator; protected final Iterator<Map.Entry<E, MutableInteger>> decorated;
/** The last returned entry */ /** The last returned entry */
protected Entry<E> last; protected Entry<E> last;
@ -64,23 +64,23 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
/** /**
* Constructs a new instance. * Constructs a new instance.
* @param iterator the iterator to decorate * @param decorated the iterator to decorate
* @param parent the parent multiset * @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) { final AbstractMapMultiSet<E> parent) {
this.iterator = iterator; this.decorated = decorated;
this.parent = parent; this.parent = parent;
} }
@Override @Override
public boolean hasNext() { public boolean hasNext() {
return iterator.hasNext(); return decorated.hasNext();
} }
@Override @Override
public Entry<E> next() { public Entry<E> next() {
last = new MultiSetEntry<>(iterator.next()); last = new MultiSetEntry<>(decorated.next());
canRemove = true; canRemove = true;
return last; return last;
} }
@ -90,7 +90,7 @@ public abstract class AbstractMapMultiSet<E> extends AbstractMultiSet<E> {
if (!canRemove) { if (!canRemove) {
throw new IllegalStateException("Iterator remove() can only be called once after next()"); throw new IllegalStateException("Iterator remove() can only be called once after next()");
} }
iterator.remove(); decorated.remove();
last = null; last = null;
canRemove = false; canRemove = false;
} }