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.
|
* 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.
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue