From 7f9fcaf667adc937d441930e934415cbc863d070 Mon Sep 17 00:00:00 2001 From: dwagelaar Date: Wed, 23 Nov 2016 21:51:18 +0100 Subject: Make LazyList implement EList. This way, LazyList (OCL: Sequence) values can be used as input parameter for EOperations with parameters with multiplicity higher than one.--- .../org/eclipse/m2m/atl/emftvm/util/LazyList.java | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse') diff --git a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java index e7ea5272..ff14823a 100644 --- a/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java +++ b/plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java @@ -23,17 +23,18 @@ import java.util.ListIterator; import java.util.Map; import java.util.NoSuchElementException; +import org.eclipse.emf.common.util.EList; import org.eclipse.m2m.atl.emftvm.CodeBlock; import org.eclipse.m2m.atl.emftvm.ExecEnv; /** - * Immutable {@link List} that supports lazy evaluation. + * Immutable {@link EList} that supports lazy evaluation. * @author Dennis Wagelaar * * @param the collection element type */ -public class LazyList extends LazyCollection implements List { +public class LazyList extends LazyCollection implements EList { /** * Abstract {@link LazyList} that disables caching of the underlying {@link LazyList}. @@ -1734,6 +1735,28 @@ public class LazyList extends LazyCollection implements List { return new SubList(fromIndex, toIndex, this); } + /** + * {@inheritDoc} + * + * Unsupported in this implementation. + + * @throws UnsupportedOperationException + */ + public void move(int newPosition, E object) { + throw new UnsupportedOperationException(); + } + + /** + * {@inheritDoc} + * + * Unsupported in this implementation. + + * @throws UnsupportedOperationException + */ + public E move(int newPosition, int oldPosition) { + throw new UnsupportedOperationException(); + } + /** * {@inheritDoc} */ -- cgit v1.2.3