|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jess.ValueVector | +--jess.Fact
A Fact is a ValueVector where the entries are the slot data in declaration order. The "head" of the fact, id, etc., are -not- stored in the vector.
(C) 1998 E.J. Friedman-Hill and the Sandia Corporation
Constructor Summary | |
Fact(Deftemplate template)
Basic constructor. |
|
Fact(Fact f)
Starts from another Fact. |
|
Fact(java.lang.String name,
Rete engine)
Basic constructor. |
Method Summary | |
java.lang.Object |
clone()
Make a copy of this fact |
boolean |
equals(java.lang.Object o)
The version in ValueVector isn't good enough, since it doesn't compare heads! |
Value |
get(int i)
Fetch the entry at position i in thie ValueVector |
Deftemplate |
getDeftemplate()
Return the deftemplate for this fact. |
int |
getFactId()
Returns this Fact's fact-id. |
Fact |
getIcon()
|
java.lang.String |
getModule()
|
java.lang.String |
getName()
|
Value |
getSlotValue(java.lang.String slotname)
Return the value from the named slot. |
int |
getTime()
|
int |
hashCode()
|
boolean |
isShadow()
Indicates whether this Fact is a shadow fact for a matched Bean. |
void |
setSlotValue(java.lang.String slotname,
Value value)
Set the value in the named slot. |
java.lang.String |
toString()
Pretty-print this fact into a String. |
java.lang.String |
toStringWithParens()
Return a String version of this ValueVector, with parentheses around all ValueVectors. |
Methods inherited from class jess.ValueVector |
add, addAll, cloneInto, copy, set, setLength, size |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Fact(Deftemplate template) throws JessException
template
- The deftemplate to useJessException
- If anything goes wrongpublic Fact(java.lang.String name, Rete engine) throws JessException
name
- The head or name of the factengine
- The engine in which to find the deftemplateJessException
- If anything goes wrongpublic Fact(Fact f) throws JessException
f
- The ValueVector form of a factengine
- The engine in which to find the deftemplateJessException
- If anything goes wrong.Method Detail |
public Fact getIcon()
public java.lang.String getName()
getName
in interface Modular
public int getFactId()
public boolean isShadow()
public final Deftemplate getDeftemplate()
public final java.lang.String getModule()
getModule
in interface Modular
public int getTime()
public Value get(int i) throws JessException
ValueVector
get
in class ValueVector
jess.ValueVector
i
- The 0-based index of the Value to fetchpublic java.lang.Object clone()
clone
in class ValueVector
public final Value getSlotValue(java.lang.String slotname) throws JessException
slotname
- The name of a slot in this factJessException
- If anything goes wrongpublic final void setSlotValue(java.lang.String slotname, Value value) throws JessException
slotname
- The name of the slotvalue
- The new value for the slotJessException
- If anything goes wrongpublic java.lang.String toString()
toString
in class ValueVector
public java.lang.String toStringWithParens()
ValueVector
toStringWithParens
in class ValueVector
jess.ValueVector
public boolean equals(java.lang.Object o)
equals
in class ValueVector
jess.ValueVector
o
- Another objectpublic int hashCode()
hashCode
in class java.lang.Object
|
© 1997 E.J. Friedman-Hill and Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |