public class Action extends Object implements Comparable<Action>
Action
is used to encapsulate the action portion of some commitment.Modifier and Type | Field and Description |
---|---|
protected Cons |
lispCode |
protected String |
name |
protected SocialCommitment |
ownerSC
The social commitment that "owns" this Action (if there is one).
|
Modifier | Constructor and Description |
---|---|
|
Action(Cons cons) |
protected |
Action(String name) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Action action)
Compares this action to another action.
|
String |
displayString()
Returns a pretty string version of this action.
|
boolean |
equals(Action action)
equals does...
|
boolean |
equals(Object object)
equals does...
|
String |
getName() |
SocialCommitment |
getOwner() |
int |
hashCode() |
PerformDescriptor |
perform(PolicyAgentInterface agent) |
void |
setOwner(SocialCommitment owner) |
String |
toString() |
protected String name
protected SocialCommitment ownerSC
protected Cons lispCode
public PerformDescriptor perform(PolicyAgentInterface agent)
public String getName()
public void setOwner(SocialCommitment owner)
public SocialCommitment getOwner()
public boolean equals(Action action)
action
- public boolean equals(Object object)
public int compareTo(Action action)
compareTo
in interface Comparable<Action>
action
- The Action
to be compared.0
if the argument is an action equal to
this action; a value less than 0
if the argument
is an action that comes after this action; and a value greater
than 0
if the argument is an action that comes
before this action.public String displayString()
"*"
if this action is null
."*"
if this action is
null
.