|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjess.Value
jess.Variable
A class to represent a Jess variable. It is 'self-resolving' using Context.
(C) 2006 Sandia National Laboratories
| Constructor Summary | |
Variable(java.lang.String name,
int type)
Create a Variable. |
|
| Method Summary | |
Fact |
factValue(Context c)
Resolves the variable, then returns the value as a Fact |
double |
floatValue(Context c)
Resolves the variable, then returns the value as a float |
int |
intValue(Context c)
Resolves the variable, then returns the value as an int |
java.lang.Object |
javaObjectValue(Context c)
Resolves the variable, then returns the value as an Java object. |
ValueVector |
listValue(Context c)
Resolves the variable, then returns the value as a list |
double |
numericValue(Context c)
Resolves the variable, then returns the value as a float |
Value |
resolveValue(Context c)
Will resolve the variable (return the value it represents.) |
java.lang.String |
stringValue(Context c)
Resolves the variable, then returns the value as a string |
java.lang.String |
symbolValue(Context c)
Resolves the variable, then returns the value as a symbol |
java.lang.String |
variableValue(Context c)
Returns the name of this variable |
| Methods inherited from class jess.Value |
atomValue, equals, equals, equalsStar, externalAddressValue, funcallValue, functionValue, hashCode, isLexeme, isNumeric, longValue, toString, toStringWithParens, type |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Variable(java.lang.String name,
int type)
throws JessException
name - the name of the variabletype - RU.VARIABLE or RU.MULTIVARIABLE
JessException - if the type is invalid| Method Detail |
public Value resolveValue(Context c)
throws JessException
resolveValue in class Valuec - an evaluation context. Cannot be null!
JessException - if the variable is undefined.Variable,
Funcall
public final java.lang.Object javaObjectValue(Context c)
throws JessException
javaObjectValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain a Java object
public final Fact factValue(Context c)
throws JessException
factValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain a fact
public final ValueVector listValue(Context c)
throws JessException
listValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain a list
public final int intValue(Context c)
throws JessException
intValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain any kind of number
public final double floatValue(Context c)
throws JessException
floatValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain any kind of number.
public final double numericValue(Context c)
throws JessException
numericValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain any kind of number
public final java.lang.String symbolValue(Context c)
throws JessException
symbolValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain any kind of Stringpublic final java.lang.String variableValue(Context c)
variableValue in class Valuec - the execution context used to resolve the value
public final java.lang.String stringValue(Context c)
throws JessException
stringValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain any kind of String.
|
© 2007 Sandia Corporation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||