|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<Object>
org.apache.myfaces.trinidad.model.RowKeySet
org.apache.myfaces.trinidad.model.RowKeySetTreeImpl
public class RowKeySetTreeImpl
Implements a collection of rowKeys from a TreeModel. The methods on this class are optimized such that it is possible to add/remove all the rowkeys in a subtree in constant time.
The generic type E is the type of a rowKey.
Constructor Summary | |
---|---|
RowKeySetTreeImpl()
Creates a new Set that is initially empty. |
|
RowKeySetTreeImpl(boolean addAll)
Creates a new Set, that may contain every rowKey by default. |
Method Summary | |
---|---|
boolean |
add(Object rowKey)
Adds the given rowKey to this Set. |
void |
addAll()
Adds the current rowKey and all rowKeys beneath the current rowKey to this Set. |
boolean |
addAll(Collection<? extends Object> other)
|
void |
clear()
Removes all rowKeys from this Set. |
RowKeySetTreeImpl |
clone()
Creates a clone of this Set. |
boolean |
contains(Object rowKey)
Tests to see if the given rowKey is included in this Set. |
protected TreeModel |
getCollectionModel()
Gets the TreeModel associated with this set. |
int |
getSize()
Gets the number of elements contained by this set. |
void |
invertAll()
Deprecated. not implemented. |
boolean |
isContainedByDefault()
Deprecated. do not use. this will be removed post Tier 1. |
boolean |
isEmpty()
|
Iterator<Object> |
iterator()
|
boolean |
remove(Object rowKey)
Removes the given rowKey from this Set. |
void |
removeAll()
Removes the current rowKey and all rowKeys beneath the current rowKey to this Set. |
boolean |
removeAll(Collection<?> other)
|
void |
setCollectionModel(CollectionModel model)
Sets the TreeModel associated with this Set. |
int |
size()
Gets the number of elements in this Set. |
Methods inherited from class org.apache.myfaces.trinidad.model.RowKeySet |
---|
add, invert, invert, isContained, remove, setContained |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
containsAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public RowKeySetTreeImpl()
public RowKeySetTreeImpl(boolean addAll)
addAll
- if this is true, every rowKey is initially added to this set.Method Detail |
---|
public boolean contains(Object rowKey)
contains
in interface Collection<Object>
contains
in interface Set<Object>
contains
in class AbstractCollection<Object>
@Deprecated public boolean isContainedByDefault()
isContainedByDefault
in class RowKeySet
public Iterator<Object> iterator()
iterator
in interface Iterable<Object>
iterator
in interface Collection<Object>
iterator
in interface Set<Object>
iterator
in class AbstractCollection<Object>
public boolean add(Object rowKey)
add
in interface Collection<Object>
add
in interface Set<Object>
add
in class AbstractCollection<Object>
remove(Object)
,
addAll()
public boolean remove(Object rowKey)
remove
in interface Collection<Object>
remove
in interface Set<Object>
remove
in class AbstractCollection<Object>
add(java.lang.Object)
,
removeAll()
public void addAll()
addAll
in class RowKeySet
add(java.lang.Object)
,
removeAll()
public void removeAll()
removeAll
in class RowKeySet
remove(Object)
,
clear()
,
addAll()
public boolean addAll(Collection<? extends Object> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration.
addAll
in interface Collection<Object>
addAll
in interface Set<Object>
addAll
in class AbstractCollection<Object>
public boolean removeAll(Collection<?> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration.
removeAll
in interface Collection<Object>
removeAll
in interface Set<Object>
removeAll
in class AbstractSet<Object>
public void clear()
HashMap.clear()
clear
in interface Collection<Object>
clear
in interface Set<Object>
clear
in class AbstractCollection<Object>
public int getSize()
getSize
in class RowKeySet
public int size()
size
in interface Collection<Object>
size
in interface Set<Object>
size
in class AbstractCollection<Object>
public boolean isEmpty()
isEmpty
in interface Collection<Object>
isEmpty
in interface Set<Object>
isEmpty
in class AbstractCollection<Object>
public final void setCollectionModel(CollectionModel model)
setCollectionModel
in class RowKeySet
model
- This must be of type TreeModel
public RowKeySetTreeImpl clone()
clone
in class RowKeySet
@Deprecated public void invertAll()
RowKeySet
For List models, this method operates on the entire List. For tree models, this method only operates on the current subtree.
invertAll
in class RowKeySet
protected TreeModel getCollectionModel()
getCollectionModel
in class RowKeySet
CollectionModel.getRowKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |