/*
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.collection.iterators;

import java.util.ListIterator;

/**
 * Base abstract class for ListIterators.
 * By default it implements mutator methods as "unsupported".
 * Especially useful if you are going to implement iterator for immutable class.
 *
 * @param <K> element type
 */
public abstract class AListIterator<K> implements ListIterator<K> {

    /**
     * protected constructor
     */
    protected AListIterator() {
        // protected constructor
    }

    @Override
    public void set(K value) {
        throw new UnsupportedOperationException();
    }

    @Override
    public void add(K value) {
        throw new UnsupportedOperationException();
    }

     @Override
    public void remove() {
        throw new UnsupportedOperationException();
    }
}
