|
||||||||||
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.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(Object rowKey)
Adds the current rowKey to this set. |
void |
addAll()
Adds every rowKey to this set. |
boolean |
addAll(Collection<? extends Object> c)
|
void |
clear()
Removes every rowKey from this set. |
RowKeySetImpl |
clone()
Creates a shallow clone of this RowKeySet. |
boolean |
contains(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(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()
|
Iterator<Object> |
iterator()
Gets an iteration of all the rowKeys contained in this Set. |
void |
readExternal(ObjectInput in)
|
boolean |
remove(Object rowKey)
Removes the current rowKey from this set. |
boolean |
removeAll(Collection<?> c)
|
void |
setCollectionModel(CollectionModel model)
Changes the underlying CollectionModel being used by this set. |
int |
size()
|
void |
writeExternal(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(Object rowKey)
contains
in interface Collection<Object>
contains
in interface Set<Object>
contains
in class AbstractCollection<Object>
public boolean add(Object rowKey)
add
in interface Collection<Object>
add
in interface Set<Object>
add
in class AbstractCollection<Object>
public boolean remove(Object rowKey)
remove
in interface Collection<Object>
remove
in interface Set<Object>
remove
in class AbstractCollection<Object>
public boolean invert(Object rowKey)
invert
in class RowKeySet
public void invertAll()
invertAll
in class RowKeySet
public void addAll()
addAll
in class RowKeySet
public boolean isContainedByDefault()
isContainedByDefault
in class RowKeySet
public void clear()
clear
in interface Collection<Object>
clear
in interface Set<Object>
clear
in class AbstractCollection<Object>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<Object>
removeAll
in interface Set<Object>
removeAll
in class AbstractSet<Object>
public boolean addAll(Collection<? extends Object> c)
addAll
in interface Collection<Object>
addAll
in interface Set<Object>
addAll
in class AbstractCollection<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 RowKeySet
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 Iterator<Object> iterator()
iterator
in interface Iterable<Object>
iterator
in interface Collection<Object>
iterator
in interface Set<Object>
iterator
in class AbstractCollection<Object>
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public RowKeySetImpl clone()
clone
in class RowKeySet
protected CollectionModel getCollectionModel()
getCollectionModel
in class RowKeySet
RowKeySet.setCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |