|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjess.Value
jess.FactIDValue
public class FactIDValue
Use this subclass of Value when you want to create a Value that represents a Fact.
In previous versions of Jess, fact-id's were more like integers; now
they are really references to facts. As such, a fact-id must represent
a valid Fact object. Call
Value.javaObjectValue(jess.Context) to get the
Fact object, and call
Fact.getFactId() to get the fact-id as an integer. This
latter manipulation will now rarely, if ever, be necessary.
| Constructor Summary | |
|---|---|
FactIDValue(Fact f)
Create a FactIDValue |
|
| Method Summary | |
|---|---|
boolean |
equals(Value v)
Compare this value to another value. |
Fact |
factValue(Context c)
Returns the contents of this value, as a fact. |
int |
getFactId()
|
int |
hashCode()
Return a hashcode for the object. |
int |
intValue(Context c)
Returns the contents of this value, as an int. |
double |
numericValue(Context c)
Returns the contents of this value, as a number. |
java.lang.String |
toString()
Return a pretty-print version of this value, without adding parens to any lists. |
| Methods inherited from class jess.Value |
|---|
atomValue, equals, equalsStar, externalAddressValue, floatValue, funcallValue, functionValue, isLexeme, isLiteral, isNumeric, isVariable, javaObjectValue, listValue, longValue, resolveValue, stringValue, symbolValue, toStringWithParens, type, variableValue |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FactIDValue(Fact f)
throws JessException
f - The fact
JessException - If the type is invalid| Method Detail |
|---|
public int intValue(Context c)
Value
intValue in class Valuec - the execution context used to resolve the value
public double numericValue(Context c)
Value
numericValue in class Valuec - the execution context used to resolve the value
public Fact factValue(Context c)
throws JessException
Value
factValue in class Valuec - the execution context used to resolve the value
JessException - if this value does not contain a factpublic java.lang.String toString()
Value
toString in class Valuepublic int hashCode()
Value
hashCode in class Valuepublic int getFactId()
public boolean equals(Value v)
Value
equals in class Valuev - the Value to compare to.
|
© 2008 Sandia Corporation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||