| Method from org.apache.commons.collections.primitives.RandomAccessCharList$RandomAccessCharListIterator Detail: |
public void add(char value) {
assertNotComodified();
getList().add(_nextIndex,value);
_nextIndex++;
_lastReturnedIndex = -1;
resyncModCount();
}
|
public boolean hasNext() {
assertNotComodified();
return _nextIndex < getList().size();
}
|
public boolean hasPrevious() {
assertNotComodified();
return _nextIndex > 0;
}
|
public char next() {
assertNotComodified();
if(!hasNext()) {
throw new NoSuchElementException();
} else {
char val = getList().get(_nextIndex);
_lastReturnedIndex = _nextIndex;
_nextIndex++;
return val;
}
}
|
public int nextIndex() {
assertNotComodified();
return _nextIndex;
}
|
public char previous() {
assertNotComodified();
if(!hasPrevious()) {
throw new NoSuchElementException();
} else {
char val = getList().get(_nextIndex-1);
_lastReturnedIndex = _nextIndex-1;
_nextIndex--;
return val;
}
}
|
public int previousIndex() {
assertNotComodified();
return _nextIndex - 1;
}
|
public void remove() {
assertNotComodified();
if(-1 == _lastReturnedIndex) {
throw new IllegalStateException();
} else {
getList().removeElementAt(_lastReturnedIndex);
_lastReturnedIndex = -1;
_nextIndex--;
resyncModCount();
}
}
|
public void set(char value) {
assertNotComodified();
if(-1 == _lastReturnedIndex) {
throw new IllegalStateException();
} else {
getList().set(_lastReturnedIndex,value);
resyncModCount();
}
}
|