model.logic
Class Literal

java.lang.Object
  extended by model.logic.Literal

public class Literal
extends java.lang.Object

This class represents a literal as it is seen in propositional logic. A literal is either a variable or the negation of a variable.

Author:
stephanieroussel

Constructor Summary
Literal(Variable variable, boolean positive)
           
 
Method Summary
 Variable getVariable()
           
 boolean isPositive()
           
 void setPositive(boolean positive)
           
 void setVariable(Variable variable)
           
 java.lang.String toLongString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Literal

public Literal(Variable variable,
               boolean positive)
Parameters:
variable - : the variable on which the literal is built
positive - : a boolean indicating whether the literal is the variable or its negation
Method Detail

getVariable

public Variable getVariable()

setVariable

public void setVariable(Variable variable)

isPositive

public boolean isPositive()

setPositive

public void setPositive(boolean positive)

toLongString

public java.lang.String toLongString()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object