Class ProviderSubset<T>
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.repeater.util.ProviderSubset<T>
-
- Type Parameters:
T- type of data
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,Set<T>,org.apache.wicket.model.IDetachable,org.apache.wicket.util.io.IClusterable
public class ProviderSubset<T> extends Object implements Set<T>, org.apache.wicket.model.IDetachable
ASetimplementation utilizing aITreeProvider's models to keep containing elements.- Author:
- svenmeier
- See Also:
ITreeProvider.model(Object), Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProviderSubset(ITreeProvider<T> provider)Create an empty subset.ProviderSubset(ITreeProvider<T> provider, boolean addRoots)Create a subset optionally containing all roots of the provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T t)booleanaddAll(Collection<? extends T> ts)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> cs)org.apache.wicket.model.IModel<Set<T>>createModel()Create a model holding this set.voiddetach()booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> cs)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<S> S[]toArray(S[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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
-
ProviderSubset
public ProviderSubset(ITreeProvider<T> provider)
Create an empty subset.- Parameters:
provider- the provider of the complete set
-
ProviderSubset
public ProviderSubset(ITreeProvider<T> provider, boolean addRoots)
Create a subset optionally containing all roots of the provider.- Parameters:
provider- the provider of the complete setaddRoots- should all roots be added to this subset
-
-
Method Detail
-
detach
public void detach()
- Specified by:
detachin interfaceorg.apache.wicket.model.IDetachable
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
clear
public void clear()
-
addAll
public boolean addAll(Collection<? extends T> ts)
-
containsAll
public boolean containsAll(Collection<?> cs)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceSet<T>
-
removeAll
public boolean removeAll(Collection<?> cs)
-
retainAll
public boolean retainAll(Collection<?> c)
-
toArray
public <S> S[] toArray(S[] a)
-
createModel
public org.apache.wicket.model.IModel<Set<T>> createModel()
Create a model holding this set.- Returns:
- model
-
-