org.eigenbase.jmi.mem
Class JmiMemFactory.ManyList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<Object>
              extended by org.eigenbase.jmi.mem.JmiMemFactory.ManyList
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess
Enclosing class:
JmiMemFactory

private static class JmiMemFactory.ManyList
extends ArrayList<Object>

List which holds instances of a bi-directional relationship.

When an instance of the relationship is created, by calling add(Object) to the collection at one end, this collection automatically finds the corresponding collection at the other end and calls its addInternal method.


Field Summary
private  JmiMemFactory.ElementImpl element
           
private  JmiMemFactory.Relationship relationship
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
JmiMemFactory.ManyList(JmiMemFactory.ElementImpl element, JmiMemFactory.Relationship relationship)
           
 
Method Summary
 boolean add(Object o)
           
 boolean addAll(Collection<?> c)
           
protected  void addInternal(JmiMemFactory.ElementImpl source)
           
 
Methods inherited from class java.util.ArrayList
add, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

element

private final JmiMemFactory.ElementImpl element

relationship

private final JmiMemFactory.Relationship relationship
Constructor Detail

JmiMemFactory.ManyList

JmiMemFactory.ManyList(JmiMemFactory.ElementImpl element,
                       JmiMemFactory.Relationship relationship)
Method Detail

add

public boolean add(Object o)
Specified by:
add in interface Collection<Object>
Specified by:
add in interface List<Object>
Overrides:
add in class ArrayList<Object>

addAll

public boolean addAll(Collection<?> c)
Specified by:
addAll in interface Collection<Object>
Specified by:
addAll in interface List<Object>
Overrides:
addAll in class ArrayList<Object>

addInternal

protected void addInternal(JmiMemFactory.ElementImpl source)