org.apache.aries.blueprint.container
Class ReferenceListRecipe.ManagedCollection

java.lang.Object
  extended by java.util.AbstractCollection
      extended by org.apache.aries.blueprint.container.ReferenceListRecipe.ManagedCollection
All Implemented Interfaces:
Iterable, Collection, List, RandomAccess
Enclosing class:
ReferenceListRecipe

public static class ReferenceListRecipe.ManagedCollection
extends AbstractCollection
implements List, RandomAccess

Base class for managed collections. TODO: list iterators should not be supported TODO: rework the iteration so that if hasNext() has returned false, it will always return false TODO: implement subList()


Nested Class Summary
 class ReferenceListRecipe.ManagedCollection.ManagedListIterator
           
 
Field Summary
protected  DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers
           
protected  boolean references
           
 
Constructor Summary
ReferenceListRecipe.ManagedCollection(boolean references, DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers)
           
 
Method Summary
 void add(int index, Object element)
           
 boolean add(Object o)
           
 boolean addAll(Collection c)
           
 boolean addAll(int index, Collection c)
           
 boolean addDispatcher(ReferenceListRecipe.ServiceDispatcher dispatcher)
           
 void clear()
           
 Object get(int index)
           
 DynamicCollection<ReferenceListRecipe.ServiceDispatcher> getDispatchers()
           
 int indexOf(Object o)
           
 Iterator iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator listIterator()
           
 ListIterator listIterator(int index)
           
 Object remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 boolean removeDispatcher(ReferenceListRecipe.ServiceDispatcher dispatcher)
           
 boolean retainAll(Collection c)
           
 Object set(int index, Object element)
           
 int size()
           
 List<ReferenceListRecipe.ServiceDispatcher> subList(int fromIndex, int toIndex)
           
 
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
contains, containsAll, equals, hashCode, isEmpty, toArray, toArray
 

Field Detail

dispatchers

protected final DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers

references

protected boolean references
Constructor Detail

ReferenceListRecipe.ManagedCollection

public ReferenceListRecipe.ManagedCollection(boolean references,
                                             DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers)
Method Detail

addDispatcher

public boolean addDispatcher(ReferenceListRecipe.ServiceDispatcher dispatcher)

removeDispatcher

public boolean removeDispatcher(ReferenceListRecipe.ServiceDispatcher dispatcher)

getDispatchers

public DynamicCollection<ReferenceListRecipe.ServiceDispatcher> getDispatchers()

iterator

public Iterator iterator()
Specified by:
iterator in interface Iterable
Specified by:
iterator in interface Collection
Specified by:
iterator in interface List
Specified by:
iterator in class AbstractCollection

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

add

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

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection

addAll

public boolean addAll(Collection c)
Specified by:
addAll in interface Collection
Specified by:
addAll in interface List
Overrides:
addAll in class AbstractCollection

clear

public void clear()
Specified by:
clear in interface Collection
Specified by:
clear in interface List
Overrides:
clear in class AbstractCollection

retainAll

public boolean retainAll(Collection c)
Specified by:
retainAll in interface Collection
Specified by:
retainAll in interface List
Overrides:
retainAll in class AbstractCollection

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface Collection
Specified by:
removeAll in interface List
Overrides:
removeAll in class AbstractCollection

get

public Object get(int index)
Specified by:
get in interface List

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List

listIterator

public ListIterator listIterator()
Specified by:
listIterator in interface List

listIterator

public ListIterator listIterator(int index)
Specified by:
listIterator in interface List

subList

public List<ReferenceListRecipe.ServiceDispatcher> subList(int fromIndex,
                                                           int toIndex)
Specified by:
subList in interface List

set

public Object set(int index,
                  Object element)
Specified by:
set in interface List

add

public void add(int index,
                Object element)
Specified by:
add in interface List

remove

public Object remove(int index)
Specified by:
remove in interface List

addAll

public boolean addAll(int index,
                      Collection c)
Specified by:
addAll in interface List


Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.