io.ebeaninternal.json.ModifyAwareListIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.json;
import java.util.ListIterator;
/**
* Modify aware wrapper of a ListIterator.
*/
public class ModifyAwareListIterator implements ListIterator {
final ModifyAwareOwner owner;
final ListIterator iterator;
public ModifyAwareListIterator(ModifyAwareOwner owner, ListIterator iterator) {
this.owner = owner;
this.iterator = iterator;
}
@Override
public boolean hasNext() {
return iterator.hasNext();
}
@Override
public E next() {
return iterator.next();
}
@Override
public boolean hasPrevious() {
return iterator.hasPrevious();
}
@Override
public E previous() {
return iterator.previous();
}
@Override
public int nextIndex() {
return iterator.nextIndex();
}
@Override
public int previousIndex() {
return iterator.previousIndex();
}
@Override
public void remove() {
owner.markAsModified();
iterator.remove();
}
@Override
public void set(E e) {
owner.markAsModified();
iterator.set(e);
}
@Override
public void add(E e) {
owner.markAsModified();
iterator.add(e);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy