|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.conversation.State
Contains the attributes and behavior of a chat fsm Finite State Machine State.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
protected java.util.HashMap |
arcs
performative name --> Arc |
protected java.lang.String |
stateId
state identifier within the fsm |
Constructor Summary | |
State(java.lang.String stateId)
Constructs a new State object. |
|
State(java.lang.String stateId,
Fsm fsm)
Constructs a new State object. |
|
State(java.lang.String stateId,
FsmClass fsmClass)
Constructs a new State object. |
Method Summary | |
void |
addArc(Arc arc)
Records the arc to take when the its performative is observed. |
void |
addArc(Performative performative,
Arc arc)
Records the arc to take when the given performative is observed. |
java.lang.Object |
clone()
Creates a clone of this object. |
int |
compareTo(java.lang.Object object)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object object)
Returns true iff some object equals this object |
Arc |
getArc(Performative performative)
Returns the arc to take for the given performative. |
java.util.Collection |
getArcs()
Returns the collection of the arcs from this state. |
java.lang.String |
getStateId()
Returns the state id. |
java.lang.String |
toString()
Returns the string representation of the State |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String stateId
protected java.util.HashMap arcs
Constructor Detail |
public State(java.lang.String stateId)
stateId
- unique state identifier within the fsmpublic State(java.lang.String stateId, FsmClass fsmClass)
stateId
- unique state identifier within the fsmfsmClass
- the fsm class containing this new statepublic State(java.lang.String stateId, Fsm fsm)
stateId
- unique state identifier within the fsmfsm
- the fsm containing this new stateMethod Detail |
public java.lang.String getStateId()
public java.util.Collection getArcs()
public void addArc(Arc arc)
arc
- the FSM arc which specifies a transition-to state and an actionpublic void addArc(Performative performative, Arc arc)
performative
- the given performativearc
- the FSM arc which specifies a transition-to state and an actionpublic Arc getArc(Performative performative)
performative
- the given performativepublic int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the reference object with which to compare.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the Object for equality comparisonpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |