com.planet_ink.coffee_mud.Common.interfaces
Interface LegalWarrant

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>
All Known Implementing Classes:
DefaultArrestWarrant

public interface LegalWarrant
extends CMCommon

A LegalWarrant is an important object in the triad of LegalBehavior and Law objects, as a part of the CoffeeMud legal system. A LegalWarrant is created by the LegalBehavior in response to the Law definitions, when it has determined that a mob or player has broken one of the Laws. The Warrant is then used as a state object following the specific circumstances around the violated law, and its adjudication. After adjudication, the object is transferred into an Old Warrants cue under the Law to use as a reference for repeat offenders.

See Also:
LegalBehavior, Law

Method Summary
 void addPunishmentParm(int code, java.lang.String parm)
          If applicable, sets any parameters associated with a particular bitmask on the punishment.
 MOB arrestingOfficer()
          If the criminal has been identified by an otherwise unoccupied officer, this will be that officer.
 java.lang.String crime()
          The crime name
 MOB criminal()
          The actual player/mob criminal accused of the crime.
 long getIgnoreUntilTime()
          Returns the real time in ms when the warrant can no longer be ignored
 long getLastStateChangeTime()
          Returns the real time in ms when the state last changed.
 java.lang.String getPunishmentParm(int code)
          If applicable, returns any parameters associated with a particular bitmask on the punishment.
 Room jail()
          Returns the room into which this criminal will be jailed.
 int jailTime()
          If applicable, returns the number of ticks the punishment calls for the criminal to remain in jail.
 long lastOffense()
          Returns the last time, in miliseconds since 1970, the criminal has committed this crime.
 int offenses()
          Returns the number of times this criminal has done this crime.
 int punishment()
          Gets the full punishment code for the crime
 Room releaseRoom()
          Returns the room into which this criminal will be released after jail.
 void setArrestingOfficer(Area legalArea, MOB mob)
          If the criminal has been identified by an otherwise unoccupied officer, this will set that officer.
 void setCrime(java.lang.String crime)
          Sets the crime name
 void setCriminal(MOB mob)
          Sets the actual player/mob criminal accused of the crime.
 void setIgnoreUntilTime(long time)
          Sets the real time in ms when the warrant can no longer be ignored
 void setJail(Room R)
          Sets the room into which this criminal will be jailed.
 void setJailTime(int time)
          If applicable, sets the number of ticks the punishment calls for the criminal to remain in jail.
 void setLastOffense(long last)
          Sets the last time, in miliseconds since 1970, the criminal has committed this crime.
 void setOffenses(int num)
          Sets the number of times this criminal has done this crime.
 void setPunishment(int code)
          Sets the full punishment code for the crime
 void setReleaseRoom(Room R)
          Sets the room into which this criminal will be released after jail.
 void setState(int state)
          Sets the current state of adjudication.
 void setTravelAttemptTime(long time)
          Sets the time, in milis since 1970, that a trip to the judge or to the jail was started.
 void setVictim(MOB mob)
          If applicable, sets the victim of the crime (or null)
 void setWarnMsg(java.lang.String msg)
          Sets the warning message given to the criminal by the officer.
 void setWitness(MOB mob)
          If applicable, sets the witness of the crime (or null)
 int state()
          Returns the current state of adjudication.
 long travelAttemptTime()
          Returns the time, in milis since 1970, that a trip to the judge or to the jail was started.
 MOB victim()
          If applicable, the victim of the crime (or null)
 java.lang.String warnMsg()
          Returns the warning message given to the criminal by the officer.
 MOB witness()
          If applicable, gets the witness of the crime (or null)
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

arrestingOfficer

MOB arrestingOfficer()
If the criminal has been identified by an otherwise unoccupied officer, this will be that officer.

Returns:
the actual living mob officer who will enforce the warrant
See Also:
setArrestingOfficer(Area, MOB)

setArrestingOfficer

void setArrestingOfficer(Area legalArea,
                         MOB mob)
If the criminal has been identified by an otherwise unoccupied officer, this will set that officer.

Parameters:
legalArea - the Area governing the law
mob - the actual living mob officer who will enforce the warrant
See Also:
arrestingOfficer()

criminal

MOB criminal()
The actual player/mob criminal accused of the crime.

Returns:
the actual player/mob criminal accused of the crime.
See Also:
setCriminal(MOB)

setCriminal

void setCriminal(MOB mob)
Sets the actual player/mob criminal accused of the crime.

Parameters:
mob - the actual player/mob criminal accused of the crime.
See Also:
criminal()

victim

MOB victim()
If applicable, the victim of the crime (or null)

Returns:
the victim of the crime, or null
See Also:
setVictim(MOB)

setVictim

void setVictim(MOB mob)
If applicable, sets the victim of the crime (or null)

Parameters:
mob - the victim of the crime, or null
See Also:
victim()

witness

MOB witness()
If applicable, gets the witness of the crime (or null)

Returns:
the witness of the crime or null
See Also:
setWitness(MOB)

setWitness

void setWitness(MOB mob)
If applicable, sets the witness of the crime (or null)

Parameters:
mob - the witness of the crime (or null)
See Also:
witness()

crime

java.lang.String crime()
The crime name

Returns:
the crime name
See Also:
setCrime(String), Law.BIT_CRIMENAME

setCrime

void setCrime(java.lang.String crime)
Sets the crime name

Parameters:
crime - the crime name
See Also:
crime(), Law.BIT_CRIMENAME

punishment

int punishment()
Gets the full punishment code for the crime

Returns:
the full punishment code for the crime
See Also:
setPunishment(int), getPunishmentParm(int), addPunishmentParm(int, String), Law.PUNISHMENT_DESCS, Law.PUNISHMENTMASK_DESCS

setPunishment

void setPunishment(int code)
Sets the full punishment code for the crime

Parameters:
code - the full punishment code for the crime
See Also:
punishment(), getPunishmentParm(int), addPunishmentParm(int, String), Law.PUNISHMENT_DESCS, Law.PUNISHMENTMASK_DESCS

getPunishmentParm

java.lang.String getPunishmentParm(int code)
If applicable, returns any parameters associated with a particular bitmask on the punishment.

Parameters:
code - the punishment mask bitmap code
Returns:
any parameters needed, or null
See Also:
addPunishmentParm(int, String), punishment(), setPunishment(int), Law.PUNISHMENTMASK_DESCS

addPunishmentParm

void addPunishmentParm(int code,
                       java.lang.String parm)
If applicable, sets any parameters associated with a particular bitmask on the punishment.

Parameters:
code - the punishment mask bitmap code
parm - the parameter to set
See Also:
getPunishmentParm(int), punishment(), setPunishment(int), Law.PUNISHMENTMASK_DESCS

jailTime

int jailTime()
If applicable, returns the number of ticks the punishment calls for the criminal to remain in jail.

Returns:
the number of ticks to be jailed for
See Also:
setJailTime(int)

setJailTime

void setJailTime(int time)
If applicable, sets the number of ticks the punishment calls for the criminal to remain in jail.

Parameters:
time - the number of ticks to be jailed for
See Also:
jailTime()

state

int state()
Returns the current state of adjudication.

Returns:
the current state of adjudication
See Also:
setState(int), Law.STATE_ARRESTING, Law.STATE_SEEKING

setState

void setState(int state)
Sets the current state of adjudication.

Parameters:
state - the current state of adjudication.
See Also:
state(), getLastStateChangeTime(), Law.STATE_DETAINING, Law.STATE_EXECUTING

offenses

int offenses()
Returns the number of times this criminal has done this crime. This is usually 0 unless it also exists in the old warrants list.

Returns:
the number of times this criminal has committed this crime.
See Also:
setOffenses(int), Law.oldWarrants()

setOffenses

void setOffenses(int num)
Sets the number of times this criminal has done this crime. This is usually 0 unless it also exists in the old warrants list.

Parameters:
num - the number of times this criminal has committed this crime.
See Also:
offenses(), Law.oldWarrants()

lastOffense

long lastOffense()
Returns the last time, in miliseconds since 1970, the criminal has committed this crime. Very useful in oldWarrants

Returns:
the last time this crime was done, in milis
See Also:
setLastOffense(long), Law.oldWarrants()

setLastOffense

void setLastOffense(long last)
Sets the last time, in miliseconds since 1970, the criminal has committed this crime. Very useful in oldWarrants

Parameters:
last - the last time this crime was done, in milis
See Also:
lastOffense(), Law.oldWarrants()

travelAttemptTime

long travelAttemptTime()
Returns the time, in milis since 1970, that a trip to the judge or to the jail was started. For housekeeping purposes.

Returns:
the milis time since the trip began
See Also:
setTravelAttemptTime(long)

setTravelAttemptTime

void setTravelAttemptTime(long time)
Sets the time, in milis since 1970, that a trip to the judge or to the jail was started. For housekeeping purposes.

Parameters:
time - the milis time since the trip began
See Also:
travelAttemptTime()

warnMsg

java.lang.String warnMsg()
Returns the warning message given to the criminal by the officer.

Returns:
the warning msg given
See Also:
setWarnMsg(String)

setWarnMsg

void setWarnMsg(java.lang.String msg)
Sets the warning message given to the criminal by the officer.

Parameters:
msg - the warning msg given
See Also:
warnMsg()

setJail

void setJail(Room R)
Sets the room into which this criminal will be jailed.

Parameters:
R - the room into which this criminal will be jailed.
See Also:
jail()

jail

Room jail()
Returns the room into which this criminal will be jailed.

Returns:
the room into which this criminal will be jailed.
See Also:
setJail(Room)

releaseRoom

Room releaseRoom()
Returns the room into which this criminal will be released after jail.

Returns:
the room into which this criminal will be released after jail.
See Also:
setReleaseRoom(Room)

setReleaseRoom

void setReleaseRoom(Room R)
Sets the room into which this criminal will be released after jail.

Parameters:
R - the room into which this criminal will be released after jail.
See Also:
releaseRoom()

getLastStateChangeTime

long getLastStateChangeTime()
Returns the real time in ms when the state last changed.

Returns:
the real time in ms when the state last changed.
See Also:
setState(int)

getIgnoreUntilTime

long getIgnoreUntilTime()
Returns the real time in ms when the warrant can no longer be ignored

Returns:
the real time in ms when the warrant can no longer be ignored
See Also:
setIgnoreUntilTime(long)

setIgnoreUntilTime

void setIgnoreUntilTime(long time)
Sets the real time in ms when the warrant can no longer be ignored

Parameters:
time - the real time in ms when the warrant can no longer be ignored
See Also:
getIgnoreUntilTime()