public class ShrinkableCollection<E> extends Object implements Collection<E>
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
.
Constructor and Description |
---|
ShrinkableCollection(Collection<? extends E> c) |
ShrinkableCollection(Collection<? extends E> c1,
Collection<? extends E> c2) |
ShrinkableCollection(List<Collection<? extends E>> l) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] var0) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public ShrinkableCollection(Collection<? extends E> c)
public ShrinkableCollection(Collection<? extends E> c1, Collection<? extends E> c2)
public ShrinkableCollection(List<Collection<? extends E>> l)
public boolean add(E e)
add
in interface Collection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
public void clear()
clear
in interface Collection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
public int size()
size
in interface Collection<E>
public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] var0)
toArray
in interface Collection<E>
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.