T
- type of datapublic class ProviderSubset<T> extends Object implements Set<T>, IDetachable
Set
implementation utilizing a ITreeProvider
's models to keep containing
elements.ITreeProvider.model(Object)
,
Serialized FormConstructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T t) |
boolean |
addAll(Collection<? extends T> ts) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> cs) |
IModel<Set<T>> |
createModel()
Create a model holding this set.
|
void |
detach()
Detaches model after use.
|
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> cs) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<S> S[] |
toArray(S[] a) |
public ProviderSubset(ITreeProvider<T> provider)
provider
- the provider of the complete setpublic ProviderSubset(ITreeProvider<T> provider, boolean addRoots)
provider
- the provider of the complete setaddRoots
- should all roots be added to this subsetpublic void detach()
IDetachable
detach
in interface IDetachable
public int size()
public boolean isEmpty()
public void clear()
public boolean contains(Object o)
public boolean add(T t)
public boolean remove(Object o)
public boolean addAll(Collection<? extends T> ts)
public boolean containsAll(Collection<?> cs)
containsAll
in interface Collection<T>
containsAll
in interface Set<T>
public boolean removeAll(Collection<?> cs)
public boolean retainAll(Collection<?> c)
public Object[] toArray()
public <S> S[] toArray(S[] a)
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.