Class DetachableSet<T>
- java.lang.Object
-
- org.wicketstuff.minis.model.collection.AbstractDetachableCollection<T>
-
- org.wicketstuff.minis.model.collection.DetachableSet<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,Set<T>,IDetachable,IClusterable
- Direct Known Subclasses:
DetachableHashSet
public abstract class DetachableSet<T> extends AbstractDetachableCollection<T> implements Set<T>
A set that can be converted between an attached and detached state.- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
AbstractDetachableCollection, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DetachableSet(IDetachCodec<T> codec)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T e)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)Set<T>getAttachedStore()Returns collection used to store elements in attached state.booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class org.wicketstuff.minis.model.collection.AbstractDetachableCollection
attach, detach, equals, hashCode, newAttachedStore
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
-
-
-
Constructor Detail
-
DetachableSet
public DetachableSet(IDetachCodec<T> codec)
Constructor- Parameters:
codec- codec that will be used to transcode elements between attached and detached states
-
-
Method Detail
-
add
public boolean add(T e)
-
addAll
public boolean addAll(Collection<? extends T> c)
-
clear
public void clear()
-
contains
public boolean contains(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceSet<T>
-
getAttachedStore
public Set<T> getAttachedStore()
Returns collection used to store elements in attached state. If this collection is currently detached it will be attached.- Overrides:
getAttachedStorein classAbstractDetachableCollection<T>- Returns:
- collection used to store elements in attached state
-
isEmpty
public boolean isEmpty()
-
remove
public boolean remove(Object o)
-
removeAll
public boolean removeAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
size
public int size()
-
toArray
public Object[] toArray()
-
-