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.
* <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.

View File

@ -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}

View File

@ -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;
}