|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liquidatom.derbyscore.domain.Bout
@ThreadSafe public class Bout
A domain object which represents a bout between two teams.
Field Summary | |
---|---|
static Duration |
INTERMISSION_DURATION
|
static Duration |
JAM_DURATION
|
static Duration |
LINEUP_DURATION
|
static Duration |
OVERTIME_LINEUP_DURATION
|
static Duration |
PERIOD_DURATION
|
static Duration |
TEAM_TIMEOUT_DURATION
|
Constructor Summary | |
---|---|
Bout(Team teamA,
Team teamB)
|
Method Summary | |
---|---|
boolean |
addListener(BoutListener listener)
|
void |
beginJam()
|
void |
endJam()
|
int |
getAdDigit()
|
BoutState |
getBoutState()
|
Clock |
getJamClock()
|
Team |
getLead()
Returns the team which currently has lead or null if the lead jammer status has not been assigned to any particular team for this jam. |
int |
getPeriod()
|
Clock |
getPeriodClock()
|
Team |
getTeamA()
|
Team |
getTeamB()
|
boolean |
isOvertime()
|
boolean |
isTeamALead()
|
boolean |
isTeamBLead()
|
boolean |
isTimeout()
|
void |
lineup()
|
void |
markConfigured()
|
void |
officialTimeout()
|
void |
onBegin(Clock clock)
|
void |
onChanged(Clock clock)
|
void |
onChanged(Team team)
Invoked when the state of the team is changed. |
void |
onEnd(Clock clock)
|
void |
onPause(Clock clock)
|
void |
onResume(Clock clock)
|
void |
onTerminate(Clock clock)
|
java.util.concurrent.locks.Lock |
readLock()
|
boolean |
removeListener(BoutListener listener)
|
protected void |
setBoutState(BoutState boutState)
|
void |
setLead(Team lead)
Set the team which has lead jammer status. |
void |
setOvertime(boolean overtime)
|
void |
setPeriod(int period)
|
void |
timeout()
Call a timeout for the given team, in order for a timeout to be successfully called, the bout must be in the LINEUP state and the team must have a positive number of timeouts remaining. |
java.util.concurrent.locks.Lock |
writeLock()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Duration PERIOD_DURATION
public static final Duration JAM_DURATION
public static final Duration TEAM_TIMEOUT_DURATION
public static final Duration LINEUP_DURATION
public static final Duration INTERMISSION_DURATION
public static final Duration OVERTIME_LINEUP_DURATION
Constructor Detail |
---|
public Bout(Team teamA, Team teamB)
Method Detail |
---|
public boolean addListener(BoutListener listener)
public boolean removeListener(BoutListener listener)
public Team getLead()
public boolean isTeamALead()
public boolean isTeamBLead()
public void setLead(Team lead)
lead
- The team which has lead jammer status or null if the status should be cleared from both teams.public int getPeriod()
public void setPeriod(int period)
public boolean isOvertime()
public void setOvertime(boolean overtime)
public BoutState getBoutState()
protected void setBoutState(BoutState boutState)
public int getAdDigit()
public boolean isTimeout()
public Clock getPeriodClock()
public Clock getJamClock()
public Team getTeamA()
public Team getTeamB()
public void markConfigured()
public void timeout()
public void officialTimeout()
public void beginJam()
public void lineup()
public void endJam()
public void onPause(Clock clock)
onPause
in interface ClockListener
public void onResume(Clock clock)
onResume
in interface ClockListener
public void onChanged(Clock clock)
onChanged
in interface ClockListener
public void onBegin(Clock clock)
onBegin
in interface ClockListener
public void onEnd(Clock clock)
onEnd
in interface ClockListener
public void onTerminate(Clock clock)
onTerminate
in interface ClockListener
public void onChanged(Team team)
TeamListener
onChanged
in interface TeamListener
team
- The team which recently changed.public java.util.concurrent.locks.Lock readLock()
readLock
in interface java.util.concurrent.locks.ReadWriteLock
public java.util.concurrent.locks.Lock writeLock()
writeLock
in interface java.util.concurrent.locks.ReadWriteLock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |