|
||||||||||
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
public abstract class RowKeySet
This Set is a mutable collection
of rowKeys.
This class is meant to be used with models that have a current rowKey concept.
Therefore, the add()
, remove()
and isContained()
methods
do not need to take the rowKey as an argument, since the rowKey is implied.
The implied key is obtained by calling getCollectionModel()
.getRowKey()
Because this Set has a reference to the underlying model, operations like
addAll()
, removeAll()
and invertAll()
may
execute in constant time.
Note that the AbstractCollection.size()
method on the this Set might be expensive to
compute. Use the getSize()
method on this class for an inexpensive size.
Constructor Summary | |
---|---|
RowKeySet()
|
Method Summary | |
---|---|
boolean |
add()
Adds the current key to this set. |
abstract void |
addAll()
Adds all the rowKeys in the current collection into this Set. |
RowKeySet |
clone()
Creates a shallow clone of this set. |
protected abstract CollectionModel |
getCollectionModel()
Gets the underlying model used by this set. |
int |
getSize()
Gets the number of elements contained by this set. |
boolean |
invert()
Adds the current rowKey to this set if it doesn't already exist; removes it otherwise. |
boolean |
invert(Object rowKey)
Adds the given rowKey to this set if it doesn't already exist, removes it otherwise. |
abstract void |
invertAll()
Inverts this Set. |
boolean |
isContained()
Checks to see if the current key is contained by this set. |
abstract boolean |
isContainedByDefault()
Deprecated. remove asap |
boolean |
remove()
Removes the current key from this set. |
void |
removeAll()
Removes all the rowKeys in the current collection from this Set. |
abstract void |
setCollectionModel(CollectionModel model)
Changes the underlying CollectionModel being used by this set. |
void |
setContained(boolean isContained)
Adds or removes the current key. |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, retainAll, size, toArray, toArray |
Constructor Detail |
---|
public RowKeySet()
Method Detail |
---|
@Deprecated public abstract boolean isContainedByDefault()
public abstract void setCollectionModel(CollectionModel model)
Users typically do not need to call this method. This method is called by component writers who need to set the models used by their components on this set.
protected abstract CollectionModel getCollectionModel()
setCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel)
public boolean invert(Object rowKey)
public final boolean invert()
public final boolean isContained()
public final void setContained(boolean isContained)
isContained
- if true, the current key is added to this set.
if false, the current key is removed from this set.public final boolean add()
public final boolean remove()
public int getSize()
AbstractCollection.size()
is that this method may return -1 if the
size is expensive to compute.
This implementation simply calls AbstractCollection.size()
.
public abstract void addAll()
public void removeAll()
For List models, this method and AbstractCollection.clear()
behave the same.
For tree models, this method only operates on the current subtree, while
the AbstractCollection.clear()
method removes everything from this Set.
This implementation simply calls AbstractCollection.clear()
public abstract void invertAll()
For List models, this method operates on the entire List. For tree models, this method only operates on the current subtree.
public RowKeySet clone()
Object.clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |