Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Action> |
actions |
Constructor and Description |
---|
JointAction() |
JointAction(java.util.List<Action> actions)
Adds all
Action objects in a list to this joint action. |
Modifier and Type | Method and Description |
---|---|
Action |
action(int agentNum)
Returns the action taken by the agent
|
java.lang.String |
actionName()
Returns the action name for this grounded action.
|
void |
addAction(Action action)
Adds a single
Action object to this joint action. |
protected static void |
allJointActionsHelper(java.util.List<java.util.List<Action>> individualActionChoices,
int i,
java.util.LinkedList<Action> currentSelections,
java.util.List<JointAction> allJointActions) |
JointAction |
copy()
Returns a copy of this grounded action.
|
boolean |
equals(java.lang.Object o) |
java.util.List<Action> |
getActions()
Returns a list of the actions in this joint action.
|
static java.util.List<JointAction> |
getAllJointActions(State s,
java.util.List<SGAgent> agents) |
static java.util.List<JointAction> |
getAllJointActionsFromTypes(State s,
java.util.List<SGAgentType> types) |
int |
hashCode() |
java.util.Iterator<Action> |
iterator() |
void |
setAction(int agentNum,
Action a)
Sets the action for the specified agent.
|
void |
setActions(java.util.List<Action> actions) |
int |
size()
Returns the number of actions in this joint action.
|
java.lang.String |
toString() |
protected java.util.ArrayList<Action> actions
public void addAction(Action action)
Action
object to this joint action. Replaces the action for the same
agent if an action for that agent is already specified.action
- the action to addpublic int size()
public java.util.List<Action> getActions()
public void setActions(java.util.List<Action> actions)
public void setAction(int agentNum, Action a)
agentNum
- the agent whose action is being seta
- the action of the agentpublic Action action(int agentNum)
agentNum
- the agent whose action is being queriedpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Iterator<Action> iterator()
iterator
in interface java.lang.Iterable<Action>
public JointAction copy()
Action
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String actionName()
Action
actionName
in interface Action
public static java.util.List<JointAction> getAllJointActions(State s, java.util.List<SGAgent> agents)
public static java.util.List<JointAction> getAllJointActionsFromTypes(State s, java.util.List<SGAgentType> types)
protected static void allJointActionsHelper(java.util.List<java.util.List<Action>> individualActionChoices, int i, java.util.LinkedList<Action> currentSelections, java.util.List<JointAction> allJointActions)