public class BooleanVariable extends java.lang.Object implements java.lang.Comparable<BooleanVariable>
CSP| Constructor and Description |
|---|
BooleanVariable() |
BooleanVariable(java.lang.String name)
Adds a new boolean variable with give name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BooleanVariable v) |
void |
decode(java.util.BitSet satValues) |
boolean |
equals(java.lang.Object obj) |
int |
getCode()
Returns the code value in the encoded representation.
|
java.lang.String |
getComment()
Returns the comment set to the boolean variable.
|
java.lang.String |
getName()
Returns the name of the boolean variable.
|
int |
getSatVariablesSize() |
boolean |
getValue()
Returns the value of the boolean variable.
|
int |
hashCode() |
boolean |
isAux()
Returns true when the boolean variable is aux.
|
boolean |
isDominant() |
void |
setCode(int code)
Sets the code value in the encoded representation.
|
void |
setComment(java.lang.String comment)
Sets the comment to the boolean variable.
|
void |
setDominant(boolean dominant) |
void |
setValue(boolean value)
Sets the value of the boolean variable.
|
java.lang.String |
toString()
Returns the string representation of the boolean variable.
|
public BooleanVariable(java.lang.String name)
throws SugarException
name - the name of the boolean variableSugarException - when the name is duplicatedpublic BooleanVariable()
throws SugarException
SugarExceptionpublic java.lang.String getName()
public boolean isAux()
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment - the comment to setpublic int getCode()
public void setCode(int code)
code - the code valuepublic boolean isDominant()
public void setDominant(boolean dominant)
public boolean getValue()
public void setValue(boolean value)
value - the value to setpublic int getSatVariablesSize()
public void decode(java.util.BitSet satValues)
public int compareTo(BooleanVariable v)
compareTo in interface java.lang.Comparable<BooleanVariable>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object