org.eclipse.osgi.internal.serviceregistry
Class ShrinkableCollection<E>
java.lang.Object
org.eclipse.osgi.internal.serviceregistry.ShrinkableCollection<E>
- All Implemented Interfaces:
- Iterable<E>, Collection<E>
public class ShrinkableCollection<E>
- extends Object
- implements Collection<E>
A Shrinkable Collection. This class provides a wrapper for a list of collections
that allows items to be removed from the wrapped collections (shrinking) but
does not allow items to be added to the wrapped collections.
The collections must act as sets in that each collection in the list
must not have two entries which are equal.
All the optional Collection operations except
add and addAll are supported. Attempting to add to the
collection will result in an UnsupportedOperationException.
ShrinkableCollection
public ShrinkableCollection(Collection<? extends E> c)
ShrinkableCollection
public ShrinkableCollection(Collection<? extends E> c1,
Collection<? extends E> c2)
ShrinkableCollection
public ShrinkableCollection(List<Collection<? extends E>> l)
add
public boolean add(E e)
- Specified by:
add in interface Collection<E>
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAll in interface Collection<E>
clear
public void clear()
- Specified by:
clear in interface Collection<E>
contains
public boolean contains(Object o)
- Specified by:
contains in interface Collection<E>
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll in interface Collection<E>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface Collection<E>
iterator
public Iterator<E> iterator()
- Specified by:
iterator in interface Iterable<E>- Specified by:
iterator in interface Collection<E>
remove
public boolean remove(Object o)
- Specified by:
remove in interface Collection<E>
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll in interface Collection<E>
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll in interface Collection<E>
size
public int size()
- Specified by:
size in interface Collection<E>
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection<E>
toArray
public <T> T[] toArray(T[] var0)
- Specified by:
toArray in interface Collection<E>
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.