diff options
author | dwagelaar | 2016-11-23 20:51:18 +0000 |
---|---|---|
committer | dwagelaar | 2016-11-23 20:51:18 +0000 |
commit | 7f9fcaf667adc937d441930e934415cbc863d070 (patch) | |
tree | 3d4f612b12127100f112274a6e8aa85755e211eb /plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl | |
parent | be75017e63c706c2f03437d80f37737e24996058 (diff) | |
download | org.eclipse.atl-7f9fcaf667adc937d441930e934415cbc863d070.tar.gz org.eclipse.atl-7f9fcaf667adc937d441930e934415cbc863d070.tar.xz org.eclipse.atl-7f9fcaf667adc937d441930e934415cbc863d070.zip |
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.
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl')
-rw-r--r-- | plugins/org.eclipse.m2m.atl.emftvm/src/org/eclipse/m2m/atl/emftvm/util/LazyList.java | 27 |
1 files changed, 25 insertions, 2 deletions
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 <a href="mailto:dwagelaar@gmail.com">Dennis Wagelaar</a> * * @param <E> the collection element type */ -public class LazyList<E> extends LazyCollection<E> implements List<E> { +public class LazyList<E> extends LazyCollection<E> implements EList<E> { /** * Abstract {@link LazyList} that disables caching of the underlying {@link LazyList}. @@ -1736,6 +1737,28 @@ public class LazyList<E> extends LazyCollection<E> implements List<E> { /** * {@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} */ @Override public boolean equals(final Object o) { |