X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.utils.datastructures%2Fsrc%2Forg%2Fsimantics%2Futils%2Fdatastructures%2FListIteratorAdapter.java;h=2256b482708c8e2ebcb62dca92bf9c63899da2a9;hp=de2c1dd31ff0742fe5dd0e6cb560f50d7b3bfc93;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/ListIteratorAdapter.java b/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/ListIteratorAdapter.java index de2c1dd31..2256b4827 100644 --- a/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/ListIteratorAdapter.java +++ b/bundles/org.simantics.utils.datastructures/src/org/simantics/utils/datastructures/ListIteratorAdapter.java @@ -1,54 +1,54 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.utils.datastructures; - -import java.util.ListIterator; - -public class ListIteratorAdapter> - extends IteratorAdapter - implements ListIterator { - - public ListIteratorAdapter(Converter converter, I iterator) { - super(converter, iterator); - } - - @Override - public void add(Range e) { - iterator.add(converter.convertFrom(e)); - } - - @Override - public boolean hasPrevious() { - return iterator.hasPrevious(); - } - - @Override - public int nextIndex() { - return iterator.nextIndex(); - } - - @Override - public Range previous() { - return converter.convertTo(iterator.previous()); - } - - @Override - public int previousIndex() { - return iterator.previousIndex(); - } - - @Override - public void set(Range e) { - iterator.set(converter.convertFrom(e)); - } - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.utils.datastructures; + +import java.util.ListIterator; + +public class ListIteratorAdapter> + extends IteratorAdapter + implements ListIterator { + + public ListIteratorAdapter(Converter converter, I iterator) { + super(converter, iterator); + } + + @Override + public void add(Range e) { + iterator.add(converter.convertFrom(e)); + } + + @Override + public boolean hasPrevious() { + return iterator.hasPrevious(); + } + + @Override + public int nextIndex() { + return iterator.nextIndex(); + } + + @Override + public Range previous() { + return converter.convertTo(iterator.previous()); + } + + @Override + public int previousIndex() { + return iterator.previousIndex(); + } + + @Override + public void set(Range e) { + iterator.set(converter.convertFrom(e)); + } + +}