|
||||||||||
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<java.lang.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(java.lang.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(java.util.Collection<? extends java.lang.Object> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration. |
void |
clear()
Removes all rowKeys from this Set. |
RowKeySetTreeImpl |
clone()
Creates a clone of this Set. |
boolean |
contains(java.lang.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()
|
java.util.Iterator<java.lang.Object> |
iterator()
|
boolean |
remove(java.lang.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(java.util.Collection<?> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration. |
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(java.lang.Object rowKey)
contains
in interface java.util.Collection<java.lang.Object>
contains
in interface java.util.Set<java.lang.Object>
contains
in class java.util.AbstractCollection<java.lang.Object>
@Deprecated public boolean isContainedByDefault()
isContainedByDefault
in class RowKeySet
public java.util.Iterator<java.lang.Object> iterator()
iterator
in interface java.lang.Iterable<java.lang.Object>
iterator
in interface java.util.Collection<java.lang.Object>
iterator
in interface java.util.Set<java.lang.Object>
iterator
in class java.util.AbstractCollection<java.lang.Object>
public boolean add(java.lang.Object rowKey)
add
in interface java.util.Collection<java.lang.Object>
add
in interface java.util.Set<java.lang.Object>
add
in class java.util.AbstractCollection<java.lang.Object>
remove(Object)
,
addAll()
public boolean remove(java.lang.Object rowKey)
remove
in interface java.util.Collection<java.lang.Object>
remove
in interface java.util.Set<java.lang.Object>
remove
in class java.util.AbstractCollection<java.lang.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(java.util.Collection<? extends java.lang.Object> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration.
addAll
in interface java.util.Collection<java.lang.Object>
addAll
in interface java.util.Set<java.lang.Object>
addAll
in class java.util.AbstractCollection<java.lang.Object>
public boolean removeAll(java.util.Collection<?> other)
If the parameter is another RowKeySetTreeImpl, this method is optimized to give superior performance and avoid iteration.
removeAll
in interface java.util.Collection<java.lang.Object>
removeAll
in interface java.util.Set<java.lang.Object>
removeAll
in class java.util.AbstractSet<java.lang.Object>
public void clear()
HashMap.clear()
clear
in interface java.util.Collection<java.lang.Object>
clear
in interface java.util.Set<java.lang.Object>
clear
in class java.util.AbstractCollection<java.lang.Object>
public int getSize()
getSize
in class RowKeySet
public int size()
size
in interface java.util.Collection<java.lang.Object>
size
in interface java.util.Set<java.lang.Object>
size
in class java.util.AbstractCollection<java.lang.Object>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<java.lang.Object>
isEmpty
in interface java.util.Set<java.lang.Object>
isEmpty
in class java.util.AbstractCollection<java.lang.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 |