org.eclipse.gmt.umlx.alien.mapping
Class AdaptingList<E extends org.eclipse.emf.ecore.EObject,A extends org.eclipse.emf.ecore.EObject,L extends java.util.List<E>>

java.lang.Object
  extended by org.eclipse.gmt.umlx.alien.mapping.AdaptingList<E,A,L>
Type Parameters:
E - Ecore model EObject type
A - Alien model EObject type
L - Ecore model List type
All Implemented Interfaces:
java.lang.Iterable<A>, java.util.Collection<A>, java.util.List<A>
Direct Known Subclasses:
AdaptingEList

public class AdaptingList<E extends org.eclipse.emf.ecore.EObject,A extends org.eclipse.emf.ecore.EObject,L extends java.util.List<E>>
extends java.lang.Object
implements java.util.List<A>

An AdaptingList maintains a List of adapting alien model objects, delegating all interaction to a corresponding list of adapted ecore objects, performing appropriate alien to ecore and ecore to alien conversions.


Constructor Summary
AdaptingList(MappingMetaData mappingMetaData, L ecoreList)
           
 
Method Summary
 boolean add(A o)
           
 void add(int index, A o)
           
 boolean addAll(java.util.Collection<? extends A> c)
           
 boolean addAll(int index, java.util.Collection<? extends A> c)
           
 void clear()
           
 boolean contains(java.lang.Object object)
           
 boolean containsAll(java.util.Collection<?> c)
           
 A get(int index)
           
 int indexOf(java.lang.Object object)
           
 boolean isEmpty()
           
 java.util.Iterator<A> iterator()
           
 int lastIndexOf(java.lang.Object o)
           
 java.util.ListIterator<A> listIterator()
           
 java.util.ListIterator<A> listIterator(int index)
           
 A remove(int index)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection<?> c)
           
 boolean retainAll(java.util.Collection<?> c)
           
 A set(int index, A element)
           
 int size()
           
 java.util.List<A> subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

AdaptingList

public AdaptingList(MappingMetaData mappingMetaData,
                    L ecoreList)
Method Detail

add

public boolean add(A o)
Specified by:
add in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
add in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

add

public void add(int index,
                A o)
Specified by:
add in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

addAll

public boolean addAll(java.util.Collection<? extends A> c)
Specified by:
addAll in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
addAll in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

addAll

public boolean addAll(int index,
                      java.util.Collection<? extends A> c)
Specified by:
addAll in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
clear in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

contains

public boolean contains(java.lang.Object object)
Specified by:
contains in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
contains in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

containsAll

public boolean containsAll(java.util.Collection<?> c)
Specified by:
containsAll in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
containsAll in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

get

public A get(int index)
Specified by:
get in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

indexOf

public int indexOf(java.lang.Object object)
Specified by:
indexOf in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
isEmpty in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

iterator

public java.util.Iterator<A> iterator()
Specified by:
iterator in interface java.lang.Iterable<A extends org.eclipse.emf.ecore.EObject>
Specified by:
iterator in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
iterator in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

lastIndexOf

public int lastIndexOf(java.lang.Object o)
Specified by:
lastIndexOf in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

listIterator

public java.util.ListIterator<A> listIterator()
Specified by:
listIterator in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

listIterator

public java.util.ListIterator<A> listIterator(int index)
Specified by:
listIterator in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
remove in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

remove

public A remove(int index)
Specified by:
remove in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

removeAll

public boolean removeAll(java.util.Collection<?> c)
Specified by:
removeAll in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
removeAll in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

retainAll

public boolean retainAll(java.util.Collection<?> c)
Specified by:
retainAll in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
retainAll in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

set

public A set(int index,
             A element)
Specified by:
set in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

size

public int size()
Specified by:
size in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
size in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

subList

public java.util.List<A> subList(int fromIndex,
                                 int toIndex)
Specified by:
subList in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
toArray in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface java.util.Collection<A extends org.eclipse.emf.ecore.EObject>
Specified by:
toArray in interface java.util.List<A extends org.eclipse.emf.ecore.EObject>