| Constructor and Description |
|---|
AbstractOperator(Clause... operands)
Constructor of the class.
|
AbstractOperator(List<Clause> operands)
Constructor of the class.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract AbstractOperator |
create(List<Clause> operands)
Generic constructor of sub-objects.
|
Clause |
getFirstOperand()
Gets the first positive operand of the operator.
|
Clause |
getOperand(int index)
Gets the operand number
index. |
List<Clause> |
getOperands()
Gets all the operands of the operator.
|
Clause |
getOperatorTail()
Gets the tail of the operator.
|
boolean |
isEmpty()
Checks if the operator has operands or not.
|
int |
operandCount()
Gets the size of the operator in terms of operands.
|
AbstractOperator |
replaceVariables(SubstitutionSet s)
Replaces all the variables in the clause according to the specified
bindings.
|
void |
setOperands(List<Clause> operands)
Sets all the operands to the specified operands.
|
AbstractOperator |
standardizeVariablesApart(Hashtable<Variable,Variable> newVars)
Standardizes the variables in order to be sure that there won't be any
variable clashes.
|
public AbstractOperator(Clause... operands)
operands - the operands of the operator in an array or as independent
variables.public void setOperands(List<Clause> operands)
operands - the new operands in an List object.public int operandCount()
public Clause getOperand(int index)
index.index - of the operand to get.index.public Clause getFirstOperand()
public Clause getOperatorTail()
public List<Clause> getOperands()
List object containing all the operands of the
operator.public boolean isEmpty()
protected abstract AbstractOperator create(List<Clause> operands)
public AbstractOperator replaceVariables(SubstitutionSet s)
This method is recursive over all PCExpression implementations.
replaceVariables in interface PCExpressions - the SubstitutionSet that contains the bindings of the
variables so far.PCExpression.replaceVariables(model.SubstitutionSet)public AbstractOperator standardizeVariablesApart(Hashtable<Variable,Variable> newVars)
This method is recursive over all PCExpression implementations.
standardizeVariablesApart in interface PCExpressionnewVars - is a parameter to save over the recursion all the variable
replacements done so far.PCExpression.standardizeVariablesApart(java.util.Hashtable)