Better parameter names
This commit is contained in:
parent
7023b20fbe
commit
552c114d4b
|
@ -327,15 +327,15 @@ public class CollatingIterator<E> implements Iterator<E> {
|
||||||
*
|
*
|
||||||
* @return {@code false} iff there was no value to set
|
* @return {@code false} iff there was no value to set
|
||||||
*/
|
*/
|
||||||
private boolean set(final int i) {
|
private boolean set(final int index) {
|
||||||
final Iterator<? extends E> it = iterators.get(i);
|
final Iterator<? extends E> it = iterators.get(index);
|
||||||
if (it.hasNext()) {
|
if (it.hasNext()) {
|
||||||
values.set(i, it.next());
|
values.set(index, it.next());
|
||||||
valueSet.set(i);
|
valueSet.set(index);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
values.set(i, null);
|
values.set(index, null);
|
||||||
valueSet.clear(i);
|
valueSet.clear(index);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,11 +193,11 @@ public class FilterListIterator<E> implements ListIterator<E> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not supported.
|
* Not supported.
|
||||||
* @param o the element with which to replace the last element returned by
|
* @param ignored the element with which to replace the last element returned by
|
||||||
* {@code next} or {@code previous}
|
* {@code next} or {@code previous}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void set(final E o) {
|
public void set(final E ignored) {
|
||||||
throw new UnsupportedOperationException("FilterListIterator.set(Object) is not supported.");
|
throw new UnsupportedOperationException("FilterListIterator.set(Object) is not supported.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,6 @@ public class ObjectArrayListIterator<E> extends ObjectArrayIterator<E>
|
||||||
if (lastItemIndex == -1) {
|
if (lastItemIndex == -1) {
|
||||||
throw new IllegalStateException("must call next() or previous() before a call to set()");
|
throw new IllegalStateException("must call next() or previous() before a call to set()");
|
||||||
}
|
}
|
||||||
|
|
||||||
array[lastItemIndex] = obj;
|
array[lastItemIndex] = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,16 +166,16 @@ public class SingletonListIterator<E> implements ResettableListIterator<E> {
|
||||||
/**
|
/**
|
||||||
* Sets sets the value of the singleton.
|
* Sets sets the value of the singleton.
|
||||||
*
|
*
|
||||||
* @param obj the object to set
|
* @param object the object to set
|
||||||
* @throws IllegalStateException if {@code next} has not been called
|
* @throws IllegalStateException if {@code next} has not been called
|
||||||
* or the object has been removed
|
* or the object has been removed
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void set(final E obj) {
|
public void set(final E object) {
|
||||||
if (!nextCalled || removed) {
|
if (!nextCalled || removed) {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
this.object = obj;
|
this.object = object;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ public final class UnmodifiableListIterator<E> implements ListIterator<E>, Unmod
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void set(final E obj) {
|
public void set(final E ignored) {
|
||||||
throw new UnsupportedOperationException("set() is not supported");
|
throw new UnsupportedOperationException("set() is not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue