|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbak.pcj.AbstractBooleanCollection
bak.pcj.set.AbstractBooleanSet
bak.pcj.set.BooleanDirectSet
This class represents sets of boolean values. The elements of the set are represented by a single state variable: 0 -> {}, 1 -> {F}, 2 -> {T}, and 3 -> {F, T}.
| Constructor Summary | |
BooleanDirectSet()
Creates a new empty set. |
|
BooleanDirectSet(BooleanCollection c)
Creates a new set with the same values as a specified collection. |
|
| Method Summary | |
boolean |
add(boolean v)
Adds an element to this collection. |
void |
clear()
Clears this collection. |
boolean |
contains(boolean v)
Indicates whether this collection contains a specified element. |
boolean |
isEmpty()
Indicates whether this collection is empty. |
BooleanIterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(boolean v)
Removes a specified element from this collection. |
int |
size()
Returns the number of elements in this collection. |
| Methods inherited from class bak.pcj.set.AbstractBooleanSet |
equals, hashCode |
| Methods inherited from class bak.pcj.AbstractBooleanCollection |
addAll, containsAll, removeAll, retainAll, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface bak.pcj.BooleanCollection |
addAll, containsAll, removeAll, retainAll, toArray, toArray, trimToSize |
| Constructor Detail |
public BooleanDirectSet()
public BooleanDirectSet(BooleanCollection c)
c - the collection whose elements to add to the
new set.
NullPointerException - if c is null.| Method Detail |
public boolean contains(boolean v)
BooleanCollection
contains in interface BooleanCollectioncontains in class AbstractBooleanCollectionpublic boolean add(boolean v)
BooleanCollection
add in interface BooleanCollectionadd in class AbstractBooleanCollectionpublic boolean remove(boolean v)
BooleanCollection
remove in interface BooleanCollectionremove in class AbstractBooleanCollectionpublic int size()
BooleanCollection
size in interface BooleanCollectionsize in class AbstractBooleanCollectionpublic boolean isEmpty()
BooleanCollection
isEmpty in interface BooleanCollectionisEmpty in class AbstractBooleanCollectionpublic void clear()
BooleanCollection
clear in interface BooleanCollectionclear in class AbstractBooleanCollectionpublic BooleanIterator iterator()
BooleanCollection
|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||