org.apache.aries.blueprint.container
Class ReferenceListRecipe.ManagedCollection
java.lang.Object
java.util.AbstractCollection
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()
dispatchers
protected final DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers
references
protected boolean references
ReferenceListRecipe.ManagedCollection
public ReferenceListRecipe.ManagedCollection(boolean references,
DynamicCollection<ReferenceListRecipe.ServiceDispatcher> dispatchers)
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-2011 The Apache Software Foundation. All Rights Reserved.