public final class Formulas
extends java.lang.Object
Constructor and Description |
---|
Formulas()
Constructs an empty formula container.
|
Formulas(Formulas formulas)
Constructs a new formula container by copying the contents of an existing one.
|
Formulas(Node formula)
Constructs a container than contains the specified formula.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Node formula)
Adds a formula expression to the formula container.
|
void |
addAll(java.util.Collection<? extends Node> formulas)
Adds all formula expression from the specified collection to the formula container.
|
void |
addAll(Formulas formulas)
Adds all formula expressions from the specified formula container to the current formula
container.
|
Node |
asSingleExpr()
Unites all stored formula expressions into a single expression using the AND operator and
returns it to the client.
|
boolean |
equals(java.lang.Object obj) |
java.util.List<Node> |
exprs()
Provides access to the list of formula expressions
|
java.util.List<Variable> |
getVariables()
Finds all variables used in the stored formula expressions and returns them to the client.
|
int |
hashCode() |
java.lang.String |
toString() |
public Formulas()
public Formulas(Formulas formulas)
formulas
- Existing formula container.java.lang.IllegalArgumentException
- if the parameter equals null
.public Formulas(Node formula)
formula
- A formula to be placed in the container.public void add(Node formula)
formula
- A formula expression.java.lang.IllegalArgumentException
- if the parameter equals null
.public void addAll(java.util.Collection<? extends Node> formulas)
formulas
- A collection of formula expressions.java.lang.IllegalArgumentException
- if the parameter equals null
.public void addAll(Formulas formulas)
formulas
- Formula container to be copied.java.lang.IllegalArgumentException
- if the parameter equals null
.public java.util.List<Node> exprs()
public Node asSingleExpr()
public java.util.List<Variable> getVariables()
java.lang.IllegalStateException
- if the method finds nodes that refer to different variable
instances that have the same name. This is illegal because all variables used in
formula expression of a constraint must be accessible via its variable table (the
signature of the constraint).public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object