|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.user.events.ActionHandler
public class ActionHandler
WRITEME: Document this type.
Field Summary | |
---|---|
private boolean |
anyIndirectObject
whether to match any indirect object |
private boolean |
anyObject
whether any direct object is matched |
private boolean |
anyRoom
WRITEME |
private boolean |
anySubject
WRITEME |
private boolean |
anyVerb
whether any verb is matched |
private String |
myIndirectObject
|
private AbstractUser |
myObject
WRITEME |
private Room |
myRoom
WRITEME |
private AbstractUser |
mySubject
WRITEME |
private ActionMethod |
myTarget
target method of the action |
private String |
myVerb
verb to be matched |
private boolean |
zoneMatch
WRITEME |
Constructor Summary | |
---|---|
ActionHandler(Room room,
AbstractUser subject,
String verb,
AbstractUser object,
ActionMethod target)
Create a new action handler matching a usual set of conditions. |
|
ActionHandler(Room room,
AbstractUser subject,
String verb,
AbstractUser object,
String dative,
ActionMethod target)
This is the “old form” action handler interface, to be replaced with the new Action object interface. |
Method Summary | |
---|---|
int |
compareTo(Object o)
|
boolean |
equals(Object obj)
|
String |
getIndirectObject()
|
AbstractUser |
getObject()
|
Room |
getRoom()
|
AbstractUser |
getSubject()
|
ActionMethod |
getTarget()
|
String |
getVerb()
|
int |
hashCode()
|
boolean |
invoke(Action action)
WRITEME: Document this method brpocock@star-hope.org |
boolean |
isAnyIndirectObject()
|
boolean |
isAnyObject()
|
boolean |
isAnyRoom()
|
boolean |
isAnySubject()
|
boolean |
isAnyVerb()
|
boolean |
isZoneMatch()
|
boolean |
matches(Action action)
WRITEME: Document this method brpocock@star-hope.org |
void |
setAnyIndirectObject(boolean really)
|
void |
setAnyObject(boolean newObject)
|
void |
setAnyRoom(boolean newRoom)
|
void |
setAnySubject(boolean newSubject)
|
void |
setAnyVerb(boolean newVerb)
|
void |
setIndirectObject(String indirectObject)
|
void |
setObject(AbstractUser newObject)
|
void |
setRoom(Room newRoom)
|
void |
setSubject(AbstractUser newSubject)
|
void |
setTarget(ActionMethod newTarget)
|
void |
setVerb(String newVerb)
|
void |
setZoneMatch(boolean newMatch)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private boolean anyObject
private boolean anyRoom
private boolean anySubject
private boolean anyVerb
private AbstractUser myObject
private Room myRoom
private AbstractUser mySubject
private ActionMethod myTarget
private String myVerb
private boolean zoneMatch
private boolean anyIndirectObject
private String myIndirectObject
Constructor Detail |
---|
public ActionHandler(Room room, AbstractUser subject, String verb, AbstractUser object, ActionMethod target)
setAnyRoom(boolean)
to true. These conditions can be
altered once the handler is created.
room
- WRITEMEsubject
- WRITEMEverb
- WRITEMEobject
- WRITEMEtarget
- WRITEMEpublic ActionHandler(Room room, AbstractUser subject, String verb, AbstractUser object, String dative, ActionMethod target)
Action
object interface.
room
- place in which the action happenedsubject
- actor causing something to happenverb
- what happenedobject
- actor to whom something has happeneddative
- indirect object explaining more about what happenedtarget
- code to be run if the event occurs as describedMethod Detail |
---|
public int compareTo(Object o)
compareTo
in interface Comparable<Object>
compareTo
in interface ActionHandlerInterface
ActionHandlerInterface.compareTo(Object)
public boolean equals(Object obj)
equals
in interface ActionHandlerInterface
equals
in class Object
ActionHandlerInterface.equals(java.lang.Object)
public String getIndirectObject()
public AbstractUser getObject()
getObject
in interface ActionHandlerInterface
ActionHandlerInterface.getObject()
public Room getRoom()
getRoom
in interface ActionHandlerInterface
ActionHandlerInterface.getRoom()
public AbstractUser getSubject()
getSubject
in interface ActionHandlerInterface
ActionHandlerInterface.getSubject()
public ActionMethod getTarget()
getTarget
in interface ActionHandlerInterface
ActionHandlerInterface.getTarget()
public String getVerb()
getVerb
in interface ActionHandlerInterface
ActionHandlerInterface.getVerb()
public int hashCode()
hashCode
in interface ActionHandlerInterface
hashCode
in class Object
ActionHandlerInterface.hashCode()
public boolean invoke(Action action)
ActionHandlerInterface
invoke
in interface ActionHandlerInterface
action
- WRITEME
ActionHandlerInterface.invoke(org.starhope.appius.user.events.Action)
public boolean isAnyIndirectObject()
public boolean isAnyObject()
isAnyObject
in interface ActionHandlerInterface
ActionHandlerInterface.isAnyObject()
public boolean isAnyRoom()
isAnyRoom
in interface ActionHandlerInterface
ActionHandlerInterface.isAnyRoom()
public boolean isAnySubject()
isAnySubject
in interface ActionHandlerInterface
ActionHandlerInterface.isAnySubject()
public boolean isAnyVerb()
isAnyVerb
in interface ActionHandlerInterface
ActionHandlerInterface.isAnyVerb()
public boolean isZoneMatch()
isZoneMatch
in interface ActionHandlerInterface
ActionHandlerInterface.isZoneMatch()
public boolean matches(Action action)
ActionHandlerInterface
matches
in interface ActionHandlerInterface
action
- WRITEME
ActionHandlerInterface.matches(org.starhope.appius.user.events.Action)
public void setAnyIndirectObject(boolean really)
really
- the anyIndirectObject to setpublic void setAnyObject(boolean newObject)
setAnyObject
in interface ActionHandlerInterface
newObject
- the anyObject to setActionHandlerInterface.setAnyObject(boolean)
public void setAnyRoom(boolean newRoom)
setAnyRoom
in interface ActionHandlerInterface
newRoom
- the anyRoom to setActionHandlerInterface.setAnyRoom(boolean)
public void setAnySubject(boolean newSubject)
setAnySubject
in interface ActionHandlerInterface
newSubject
- the anySubject to setActionHandlerInterface.setAnySubject(boolean)
public void setAnyVerb(boolean newVerb)
setAnyVerb
in interface ActionHandlerInterface
newVerb
- the anyVerb to setActionHandlerInterface.setAnyVerb(boolean)
public void setIndirectObject(String indirectObject)
indirectObject
- the Indirect Object to setpublic void setObject(AbstractUser newObject)
setObject
in interface ActionHandlerInterface
newObject
- the myObject to setActionHandlerInterface.setObject(org.starhope.appius.user.AbstractUser)
public void setRoom(Room newRoom)
setRoom
in interface ActionHandlerInterface
newRoom
- the myRoom to setActionHandlerInterface.setRoom(org.starhope.appius.game.Room)
public void setSubject(AbstractUser newSubject)
setSubject
in interface ActionHandlerInterface
newSubject
- the mySubject to setActionHandlerInterface.setSubject(org.starhope.appius.user.AbstractUser)
public void setTarget(ActionMethod newTarget)
setTarget
in interface ActionHandlerInterface
newTarget
- the myTarget to setActionHandlerInterface.setTarget(org.starhope.appius.user.events.ActionMethod)
public void setVerb(String newVerb)
setVerb
in interface ActionHandlerInterface
newVerb
- the myVerb to setActionHandlerInterface.setVerb(java.lang.String)
public void setZoneMatch(boolean newMatch)
setZoneMatch
in interface ActionHandlerInterface
newMatch
- the zoneMatch to setActionHandlerInterface.setZoneMatch(boolean)
public String toString()
toString
in interface ActionHandlerInterface
toString
in class Object
ActionHandlerInterface.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |