public final class RowKeySetImpl extends RowKeySet implements Externalizable
This class has very efficient implementations for addAll, clear and invertAll.
Constructor and Description |
---|
RowKeySetImpl()
Creates an initially empty RowKeySet.
|
RowKeySetImpl(boolean addAll)
Creates a new RowKeySet.
|
Modifier and Type | Method and Description |
---|---|
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) |
add, invert, isContained, remove, removeAll, setContained
equals, hashCode
containsAll, retainAll, toArray, toArray, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, retainAll, toArray, toArray
public RowKeySetImpl()
public RowKeySetImpl(boolean addAll)
addAll
- whether to add every rowKey to this set.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)
public void invertAll()
public void addAll()
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()
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()
protected CollectionModel getCollectionModel()
getCollectionModel
in class RowKeySet
RowKeySet.setCollectionModel(org.apache.myfaces.trinidad.model.CollectionModel)
Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.