Class satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

java.lang.Object
  extended bysatisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
All Implemented Interfaces:
java.lang.Cloneable

public class satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
extends java.lang.Object
implements java.lang.Cloneable

by Catherine Block id# 6319 Date: Sep 6, 2004 Time: 11:02:35 AM CS 180H A satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions is a clauseList of disjunctions. Delimiters are defined in the satisfiabilityApplet.cnfParser.Grammar class. The destructor method must be used to properly dispose of Conjunctions


Constructor Summary
satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions(java.util.List tokens)
          Constructor creates a new satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions after calling the constructors for the contained disjunctions.
 
Method Summary
 java.lang.Object clone()
          Creates a copy of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 void convert()
          Mutator method that will effectively convert a DNF entry into its negated CNF form by switching the "not" status of all the variables
 void destructor()
          Destructor method must be called to properly destroy all the contents of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 boolean isTrue()
          Checks this conjunction to see if all of the disjunctions have a set value of true.
 java.lang.String toPolynomial()
          A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions
 java.lang.String toString()
           
 java.util.List value()
          The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

public satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions(java.util.List tokens)
            throws satisfiabilityApplet.cnfParser.ParseError
Constructor creates a new satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions after calling the constructors for the contained disjunctions.

Parameters:
tokens - A clauseList of tokens that reprensents a conjunction
Throws:
satisfiabilityApplet.cnfParser.ParseError - - The clauseList of tokens does not parse to a conjunction
Method Detail

value

public java.util.List value()
The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.

Returns:
- The clauseList of Disjunctions contained by this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions.

isTrue

public boolean isTrue()
               throws satisfiabilityApplet.cnfParser.UnsupportedTypeError
Checks this conjunction to see if all of the disjunctions have a set value of true.

Returns:
The truth value of this conjunction
Throws:
satisfiabilityApplet.cnfParser.UnsupportedTypeError - One or more disjunctions in this conjunctions have not had their truth values set.

convert

public void convert()
Mutator method that will effectively convert a DNF entry into its negated CNF form by switching the "not" status of all the variables


clone

public java.lang.Object clone()
Creates a copy of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

Returns:
A copy of this conjunction

toPolynomial

public java.lang.String toPolynomial()
A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

Returns:
- A polynomial representation of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions

destructor

public void destructor()
Destructor method must be called to properly destroy all the contents of this satisfiabilityApplet.cnfParser.ConjunctionOfDisjunctions


toString

public java.lang.String toString()
Returns:
A string representation of this object