public abstract class AbstractOperations extends AbstractTerm implements Operations
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
operandName |
protected java.util.List<Term> |
terms |
Constructor and Description |
---|
AbstractOperations(java.lang.String operandName) |
Modifier and Type | Method and Description |
---|---|
void |
addOperand(Term term)
add another operand to the operations term
|
java.util.List<Term> |
getOperands()
As a Operations object is a collection of Terms, we must be able to show them
|
int |
hashCode() |
boolean |
isAssociative()
can we set brackets anywhere (means: can we change calculation order)?
|
boolean |
isBinary()
the operation is binary, if it contains two operands
|
boolean |
isCommutative()
can we switch operands (must be binary)
|
boolean |
isDistributive()
can we 'multiply inside' (must be binary)
|
Term |
lightestRewrite()
Applying a rewrite rule to the term should not change the logical expression of the term.
|
java.lang.String |
toString()
create a Solr query string from this conjunction
|
int |
weight()
the weight attribute of a term shows if rewritten terms
(using rules of replacement as allowed for propositional logic)
are shorter and therefore more efficient.
|
apply
protected final java.lang.String operandName
protected final java.util.List<Term> terms
public int hashCode()
hashCode
in class java.lang.Object
public void addOperand(Term term)
Operations
addOperand
in interface Operations
public java.util.List<Term> getOperands()
getOperands
in interface Operations
public int weight()
public boolean isBinary()
Operations
isBinary
in interface Operations
public boolean isAssociative()
isAssociative
in interface Operations
public boolean isCommutative()
isCommutative
in interface Operations
public boolean isDistributive()
isDistributive
in interface Operations
public Term lightestRewrite()
Term
lightestRewrite
in interface Term