model.logic
Class Literal
java.lang.Object
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
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Literal
public Literal(Variable variable,
boolean positive)
- Parameters:
variable
- : the variable on which the literal is builtpositive
- : a boolean indicating whether the literal is the variable or its negation
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