|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.search.rewriter.MinimalCondition
public class MinimalCondition
A class encapsulating details about a condition (NodeLogical or NodeCondition) which is to be assigned to a new SimpleQuery during a query rewrite. This will be done by the ConditionDistributor. Records the condition along with the variables involved in it, and a boolean indicating whether or not this condition has been distributed to a new query.
Constructor Summary | |
---|---|
MinimalCondition(SimpleNode cond)
Initialise the object with a condition. |
Method Summary | |
---|---|
void |
addVariable(DeclarableVariable dv)
Adds a DeclarableVariable to the list of DeclarableVariables in this condition. |
void |
addVariable(java.lang.String var)
Adds a variable name to the list of variables in this condition. |
int |
getCardinality()
Returns the number of variables involved in this condition. |
SimpleNode |
getCondition()
Returns the condition node represented by this MinimalCondition. |
java.util.List |
getVariableNames()
Returns the names of the variables used in this condition. |
java.util.List |
getVariablesOfCardinality(int n)
Returns the names of all the DeclarableVariable objects which are of the given cardinality (those which appear in n conditions). |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MinimalCondition(SimpleNode cond)
cond
- a SimpleNode representing the condition to be encapsulatedMethod Detail |
---|
public void addVariable(java.lang.String var)
var
- the name of the variable to addpublic void addVariable(DeclarableVariable dv)
dv
- a DeclarableVariable object to addpublic int getCardinality()
public java.util.List getVariableNames()
public SimpleNode getCondition()
public java.util.List getVariablesOfCardinality(int n)
n
- the cardinality required of the variables
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |