Module org.apache.wicket.extensions
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>
,IDetachable
,IClusterable
A
Set
implementation utilizing a ITreeProvider
's models to keep containing
elements.- Author:
- svenmeier
- See Also:
-
Constructor Summary
ConstructorDescriptionProviderSubset
(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
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends T> ts) void
clear()
boolean
boolean
containsAll
(Collection<?> cs) Create a model holding this set.void
detach()
Detaches model after use.boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> cs) boolean
retainAll
(Collection<?> c) int
size()
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 Details
-
ProviderSubset
Create an empty subset.- Parameters:
provider
- the provider of the complete set
-
ProviderSubset
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 Details
-
detach
Description copied from interface:IDetachable
Detaches model after use. This is generally used to null out transient references that can be re-attached later.- Specified by:
detach
in interfaceIDetachable
-
size
-
isEmpty
-
clear
-
contains
-
add
-
remove
-
iterator
-
addAll
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceSet<T>
-
removeAll
-
retainAll
-
toArray
-
toArray
-
createModel
Create a model holding this set.- Returns:
- model
-