001 /* 002 * www.ti.bfh.ch 003 * 004 * Copyright 2007, Berne University of Applied Sciences, 005 * School of Engineering and Information Technology 006 * and individual contributors as indicated by the @authors tag. 007 * 008 * This is free software; you can redistribute it and/or modify it under the terms of the 009 * GNU Lesser General Public License as published by the Free Software Foundation; 010 * either version 3 of the License, or (at your option) any later version. 011 * 012 * This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 013 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 014 * See the GNU Lesser General Public License for more details. 015 * 016 * You should have received a copy of the GNU Lesser General Public License along with this software; 017 * if not, see <http://www.gnu.org/licenses/>. 018 * 019 */ 020 package ch.bfh.algo.core.sequence; 021 022 import java.util.ListIterator; 023 024 public class LinkedElementIterator<E,P extends GenericLinkedPosition<E,P>> extends LinkedIterator<E,P> implements ListIterator<E>{ 025 026 public LinkedElementIterator(GenericLinkedSequence<E,P> sequence, P before, P after){ 027 super(sequence,before,after); 028 } 029 030 public E next(){ 031 return this.nextElement(); 032 } 033 034 public E previous(){ 035 return this.previousElement(); 036 } 037 038 public void add(E element){ 039 this.addElement(element); 040 } 041 042 public void set(E element){ 043 this.setElement(element); 044 } 045 }