|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.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 BooleanCollection
contains
in class AbstractBooleanCollection
public boolean add(boolean v)
BooleanCollection
add
in interface BooleanCollection
add
in class AbstractBooleanCollection
public boolean remove(boolean v)
BooleanCollection
remove
in interface BooleanCollection
remove
in class AbstractBooleanCollection
public int size()
BooleanCollection
size
in interface BooleanCollection
size
in class AbstractBooleanCollection
public boolean isEmpty()
BooleanCollection
isEmpty
in interface BooleanCollection
isEmpty
in class AbstractBooleanCollection
public void clear()
BooleanCollection
clear
in interface BooleanCollection
clear
in class AbstractBooleanCollection
public BooleanIterator iterator()
BooleanCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |