public class History
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
OPPONENT_ID |
static int |
SYSTEM_ID |
static int |
USER_ID |
Constructor and Description |
---|
History() |
Modifier and Type | Method and Description |
---|---|
void |
addNegotiator(GeneralNegotiator negotiator)
Adds a negotiator to the list of attached negotiators.
|
java.util.LinkedList<Event> |
getHistory()
Returns a LinkedList of events that either negotiator has caused (i.e., the total history).
|
java.util.LinkedList<Event> |
getOpponentHistory()
Returns a LinkedList of events that the opponent VH has caused (i.e., the opponent history).
|
java.util.LinkedList<Event> |
getOpponentHistory(int agentID)
This method is to be called by an agent to determine its adversary's history of events.
|
java.util.LinkedList<Event> |
getUserHistory()
Returns a LinkedList of events that the user or the user's VH has caused (i.e., the user history).
|
java.lang.String |
toString()
Returns a stringified version of the history, in three sections: the user history, opponent history, and total history.
|
protected void |
updateHistory(Event e)
Adds an event to the total history and either opponent history or user history.
|
public static final int SYSTEM_ID
public static final int USER_ID
public static final int OPPONENT_ID
public void addNegotiator(GeneralNegotiator negotiator)
negotiator
- to add to the listpublic java.util.LinkedList<Event> getOpponentHistory()
public java.util.LinkedList<Event> getUserHistory()
public java.util.LinkedList<Event> getOpponentHistory(int agentID)
public java.util.LinkedList<Event> getHistory()
protected void updateHistory(Event e)
e
- the event to be added to the History.public java.lang.String toString()
toString
in class java.lang.Object