public class Turn
extends java.lang.Object
Turn
objects are
contained in Round
objects which are in their turn contained in a
Session
object. A single Turn is executed by a single
NegotiationParty
. A party is however, allowed to
have multiple turns in a single round.Constructor and Description |
---|
Turn(NegotiationPartyInternal party)
Initializes a new instance of the turn class.
|
Turn(NegotiationPartyInternal party,
java.lang.Class<? extends Action>... validActions)
Initializes a new instance of the turn class.
|
Turn(NegotiationPartyInternal party,
java.util.Collection<java.lang.Class<? extends Action>> validActions)
Initializes a new instance of the turn class.
|
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Gets the action executed this turn
|
NegotiationPartyInternal |
getParty()
Get the party which should execute this turn
|
java.util.ArrayList<java.lang.Class<? extends Action>> |
getValidActions()
Get (copy of) all valid actions for this turn.
|
void |
setAction(Action action)
Sets the action executed this turn.
|
public Turn(NegotiationPartyInternal party)
Turn
class itself for more information on usage.party
- The party that should execute this turnpublic Turn(NegotiationPartyInternal party, java.lang.Class<? extends Action>... validActions)
Turn
class itself for more information on usage.party
- The party that should execute this turnvalidActions
- Valid Action
classes that can be executed this turnpublic Turn(NegotiationPartyInternal party, java.util.Collection<java.lang.Class<? extends Action>> validActions)
Turn
class itself for more information on usage.party
- The party that should execute this turnvalidActions
- Valid Action
classes that can be executed this turnpublic NegotiationPartyInternal getParty()
NegotiationParty
that should do
this turn.public java.util.ArrayList<java.lang.Class<? extends Action>> getValidActions()
Action
classes valid this turnpublic Action getAction()
Null
if turn not done yet.public void setAction(Action action)
action
- The action that was executed.