|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.able.beans.AbleAtom | +--com.ibm.able.beans.rules.AbleRuleVariable
A Variable can hold a value and can appear on the lefthand and righthand side of clauses.
Version Description -------- ----------- 1.0.0 Initial release.
Field Summary | |
protected java.util.Vector |
clauseRefs
clauseRefs is a list of clauses that reference this variable. |
Fields inherited from class com.ibm.able.beans.AbleAtom |
name,
value |
Constructor Summary | |
AbleRuleVariable(java.lang.String theName)
Create a new variable with the specified name. |
|
AbleRuleVariable(java.lang.String theName,
boolean theInitValue)
Create a new variable with the specified name and initial boolean value. |
|
AbleRuleVariable(java.lang.String theName,
double theInitValue)
Create a new variable with the specified name and initial numeric value. |
|
AbleRuleVariable(java.lang.String theName,
double theLoValue,
double theHiValue)
Create a new variable with the specified name and continuous numeric range. |
|
AbleRuleVariable(java.lang.String theName,
java.lang.String theSymbolList)
Create a new variable with the specified name and categorical labels. |
Method Summary | |
void |
addClauseRef(AbleClause aClauseReference)
Register a clause which refers to this variable. |
void |
addClauseRef(AbleConsequentClause aClauseReference)
Register a clause which refers to this variable. |
void |
askUser()
|
java.util.Vector |
getClauseRefs()
Retrieve a list of clauses that refer to this variable. |
int |
getIndex(java.lang.String aLabel)
Retrieve the index of the specified label. |
java.lang.String |
getLabel(int anIndex)
Retrieve the label with the specified index. |
java.lang.String |
getLabels()
Retrieve a string containing all the labels for this variable. |
java.lang.String |
getStringValue()
Retrieve the current value of this variable. |
java.lang.Object |
getValue()
Retrieve the current value of this variable. |
boolean |
isCategorical()
Determine whether this variable is a categorical variable. |
void |
reset()
Reset the variable to its initial state. |
java.lang.String |
rlString()
Return a formal rule language string. |
void |
setLabels(java.lang.String newLabels)
Specify a set of textual labels which can be used to refer to the various values of this variable. |
void |
setPromptText(java.lang.String aPrompt)
Set prompt text for this variable that can be used to query the end-user for a new value for this variable. |
void |
setRuleName(java.lang.String aRuleName)
Set a rulename for this variable. |
void |
setValue(java.lang.Object aValue)
Set the value of this variable. |
java.lang.String |
toString()
|
void |
updateClauses()
Re-evaluate each clause that refers to this variable with the side effect that each clause's truth value is updated. |
java.lang.String |
xmlString()
Return a formal XML string. |
Methods inherited from class com.ibm.able.beans.AbleAtom |
getName |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.util.Vector clauseRefs
Constructor Detail |
public AbleRuleVariable(java.lang.String theName)
public AbleRuleVariable(java.lang.String theName, boolean theInitValue)
public AbleRuleVariable(java.lang.String theName, double theLoValue, double theHiValue)
public AbleRuleVariable(java.lang.String theName, double theInitValue)
public AbleRuleVariable(java.lang.String theName, java.lang.String theSymbolList)
Method Detail |
public void setValue(java.lang.Object aValue)
aValue
- Any arbitrary object that represents the value of this
variable.
public java.lang.Object getValue()
public java.lang.String getStringValue()
public void setLabels(java.lang.String newLabels)
newLabels
- A string of blank delimited words, each of which
represents a label for a particular value of the variable.
public java.lang.String getLabels()
public java.lang.String getLabel(int anIndex)
anIndex
- A zero-based index into the list of labels.
public int getIndex(java.lang.String aLabel)
aLabel
- A string representing a label for a value of this variable.
public boolean isCategorical()
public void addClauseRef(AbleClause aClauseReference)
aClauseReference
- A clause object which refers to this variable.
public void addClauseRef(AbleConsequentClause aClauseReference)
aClauseReference
- A consequent clause object which refers to this variable.
public java.util.Vector getClauseRefs()
public void updateClauses()
public void setRuleName(java.lang.String aRuleName)
aRuleName
- Any arbitrary string.
public void setPromptText(java.lang.String aPrompt)
aPrompt
- Any arbitrary string.
public java.lang.String toString()
public void askUser()
public void reset()
public java.lang.String rlString()
public java.lang.String xmlString()
|
ABLE, Version 1.1b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |