satisfiabilityApplet.cnfParser
Class Literal

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

public class Literal
extends java.lang.Object
implements java.lang.Cloneable

by Catherine Block id# 6319 Date: Sep 6, 2004 Time: 10:45:22 AM CS 180H


Constructor Summary
Literal(java.util.List tokens)
           
 
Method Summary
 java.lang.Object clone()
           
 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()
           
 boolean getBooleanValue()
          The assigned Boolean value of this literal.
 boolean isNegative()
           
static boolean isNext(java.util.List tokens)
           
 boolean isSet()
          This literal's variable has a set value
 void setToFalse()
          Sets the value of this literal to false, (as a consequence, all instances of the variable contained will be set)
 void setToTrue()
          Sets the value of this literal to true, (as a consequence, all instances of the variable contained will be set)
 Variable symbol()
           
 java.lang.String toPolynomial()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Literal

public Literal(java.util.List tokens)
        throws ParseError
Method Detail

isNext

public static boolean isNext(java.util.List tokens)

symbol

public Variable symbol()

isNegative

public boolean isNegative()

getBooleanValue

public boolean getBooleanValue()
                        throws BooleanValueNotSet
The assigned Boolean value of this literal.

Returns:
the boolean value of this literal
Throws:
BooleanValueNotSet - no boolean value has been assigned

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


setToTrue

public void setToTrue()
Sets the value of this literal to true, (as a consequence, all instances of the variable contained will be set)


setToFalse

public void setToFalse()
Sets the value of this literal to false, (as a consequence, all instances of the variable contained will be set)


isSet

public boolean isSet()
This literal's variable has a set value

Returns:
if this literal's variable has a set value

clone

public java.lang.Object clone()

destructor

public void destructor()

toPolynomial

public java.lang.String toPolynomial()

toString

public java.lang.String toString()