|
||||||||||
| 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.RowKeySetImpl
public final class RowKeySetImpl
Implements a set of rowKeys. This set is connected with a CollectionModel and is actually a subset of the rowKeys contained by the CollectionModel. This set is used to group together rows that have a common UI property. For example, all the rows that are currently selected by a user might be placed in a single RowKeySet.
This class has very efficient implementations for addAll, clear and invertAll.
| Constructor Summary | |
|---|---|
RowKeySetImpl()
Creates an initially empty RowKeySet. |
|
RowKeySetImpl(boolean addAll)
Creates a new RowKeySet. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object rowKey)
Adds the current rowKey to this set. |
void |
addAll()
Adds every rowKey to this set. |
boolean |
addAll(java.util.Collection<? extends java.lang.Object> c)
|
void |
clear()
Removes every rowKey from this set. |
RowKeySetImpl |
clone()
Creates a shallow clone of this RowKeySet. |
boolean |
contains(java.lang.Object rowKey)
Checks to see the current rowKey is contained by this set. |
protected CollectionModel |
getCollectionModel()
Gets the CollectionModel associated with this set. |
int |
getSize()
Gets the number of rowKeys in this set (if known). |
boolean |
invert(java.lang.Object rowKey)
Adds the current rowKey to this set if it doesn't already exist, removes it otherwise. |
void |
invertAll()
Inverts this set. |
boolean |
isContainedByDefault()
|
boolean |
isEmpty()
|
java.util.Iterator<java.lang.Object> |
iterator()
Gets an iteration of all the rowKeys contained in this Set. |
void |
readExternal(java.io.ObjectInput in)
|
boolean |
remove(java.lang.Object rowKey)
Removes the current rowKey from this set. |
boolean |
removeAll(java.util.Collection<?> c)
|
void |
setCollectionModel(CollectionModel model)
Changes the underlying CollectionModel being used by this set. |
int |
size()
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class org.apache.myfaces.trinidad.model.RowKeySet |
|---|
add, invert, isContained, remove, removeAll, 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 RowKeySetImpl()
public RowKeySetImpl(boolean addAll)
addAll - whether to add every rowKey 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>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>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>public boolean invert(java.lang.Object rowKey)
invert in class RowKeySetpublic void invertAll()
invertAll in class RowKeySetpublic void addAll()
addAll in class RowKeySetpublic boolean isContainedByDefault()
isContainedByDefault in class RowKeySetpublic void 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 boolean removeAll(java.util.Collection<?> c)
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 boolean addAll(java.util.Collection<? extends java.lang.Object> c)
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 final 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.
setCollectionModel in class RowKeySetpublic int getSize()
getSize in class RowKeySetpublic 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 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 void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOException
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundExceptionpublic RowKeySetImpl clone()
clone in class RowKeySetprotected CollectionModel getCollectionModel()
getCollectionModel in class RowKeySetRowKeySet.setCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||