jasi.sim.user.model.activity
Class AbstractActivityBean

java.lang.Object
  extended by jasi.sim.basic.value.AbstractSimValueType
      extended by jasi.sim.basic.value.AbstractComparableObject<Element>
          extended by jasi.sim.basic.element.AbstractElementBean
              extended by jasi.sim.user.model.activity.AbstractActivityBean
All Implemented Interfaces:
Element, EventListener, SimObject, ExtendedComparable<Element>, SimValue, Activity, java.io.Serializable, java.lang.Comparable<Element>
Direct Known Subclasses:
LinearActivity

public abstract class AbstractActivityBean
extends AbstractElementBean
implements Activity

Implementation of simulation activities.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface jasi.sim.basic.element.Element
COMPARATOR
 
Constructor Summary
protected AbstractActivityBean()
          Constructor of ActivityBean.
protected AbstractActivityBean(Id id)
          Construct of ActivityBean.
 
Method Summary
 void execute(Event event)
          Handle or execute a pushed event by this event listener/model.
 Time getEndTime()
          Get the expected end time of this activity.
 Time getStartTime()
          Get the start time of this activity.
 void setEndTime(Time endTime)
          Set the end time.
 void setStartTime(Time startTime)
          Set the start time.
 void start()
          The activity is starting.
 void start(Calendar calendar)
          The activity is starting.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class jasi.sim.basic.element.AbstractElementBean
acceptDelete, compareTo, delete, elements, equals, get, getId, getKey, hashCode, isDeleted, registered, set, setId, setKey
 
Methods inherited from class jasi.sim.basic.value.AbstractComparableObject
isEQ, isGE, isGT, isLE, isLT, isNE
 
Methods inherited from class jasi.sim.basic.value.AbstractSimValueType
getContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jasi.sim.user.model.activity.Activity
finish, getGrade
 

Constructor Detail

AbstractActivityBean

protected AbstractActivityBean()
Constructor of ActivityBean.


AbstractActivityBean

protected AbstractActivityBean(Id id)
Construct of ActivityBean.

Parameters:
id - The simulation element's ID.
Method Detail

setStartTime

public final void setStartTime(Time startTime)
Set the start time.

Parameters:
startTime - The startTime.

getStartTime

public final Time getStartTime()
Get the start time of this activity.

Specified by:
getStartTime in interface Activity
Returns:
The start time.

setEndTime

public final void setEndTime(Time endTime)
Set the end time.

Parameters:
endTime - The startTime.

getEndTime

public final Time getEndTime()
Get the expected end time of this activity.

Specified by:
getEndTime in interface Activity
Returns:
The end time.

execute

public final void execute(Event event)
Handle or execute a pushed event by this event listener/model.

Specified by:
execute in interface EventListener
Parameters:
event - The popped event to be handled by this listener.

start

public final void start(Calendar calendar)
The activity is starting.

Parameters:
calendar - The calendar.
See Also:
Activity.start()

start

public final void start()
The activity is starting.

Specified by:
start in interface Activity
See Also:
Activity.start()

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class AbstractElementBean
Returns:
The string.