revisionlogic
Class HSet
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
revisionlogic.HSet
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.io.Serializable, java.util.Set
- class HSet
- extends java.util.HashSet
Class HSet is a more specific HashSet that performs further checking when adding an element. It represents the
clauses of either a conjunction or a disjunction. For a conjunction, if one of its conjuncts is the negation of
another conjunct, the conjunction is transformed into a contradiction. For a disjunction, if one of its disjuncts
is the negation of another disjunct, the disjunction is transformed into a tautology.
- Author:
- Daphne Liu, daphnel@sfu.ca
Field Summary |
(package private) ISent |
refStatic
A reference to a tautology for disjunctive clauses, or to a contradiction for conjunctive clauses. |
Fields inherited from class java.util.HashSet |
|
Constructor Summary |
(package private) |
HSet(int type)
Constructs a new HSet of type _type clauses. |
Method Summary |
boolean |
add(java.lang.Object o)
Adds an element o to this HSet. |
boolean |
addAll(java.util.Vector c)
Adds each element of the collection c to this HSet. |
Methods inherited from class java.util.HashSet |
clear, clone, contains, isEmpty, iterator, remove, size |
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, 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 |
addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
refStatic
ISent refStatic
- A reference to a tautology for disjunctive clauses, or to a contradiction for conjunctive clauses.
HSet
HSet(int type)
- Constructs a new HSet of type
_type
clauses.
add
public boolean add(java.lang.Object o)
- Adds an element
o
to this HSet.
- Returns:
- false if
o
is null or if the negation of o
is already in this HSet, true otherwise.
addAll
public boolean addAll(java.util.Vector c)
- Adds each element of the collection
c
to this HSet.
- Returns:
- false if an element is null or if the negation of an element is already in this HSet, true otherwise.