jasi.sim.basic.element
Interface Element

All Superinterfaces:
java.lang.Comparable<Element>, java.io.Serializable, SimObject
All Known Subinterfaces:
Airplane, Airport, Flight, Movable, Sensable, Sensing, SimpleObject
All Known Implementing Classes:
AbstractActivityBean, AbstractElementBean, AirplaneBean, AirplaneHandler, AirportBean, AirportHandler, BinaryRelation, BinaryRelationHandler, ComplexElement, ComplexElementHandler, FlightBean, FlightHandler, LinearActivity, MultiRelation, MultiRelationHandler, SimpleElement, SimpleElementHandler, SimpleMovingElement, SimpleMovingElementHandler

public interface Element
extends java.lang.Comparable<Element>, SimObject

Basic methods and behavior for all simulation elements.


Field Summary
static java.util.Comparator<Element> COMPARATOR
          Comparison function, which imposes a total ordering of events.
 
Method Summary
 Element delete()
          Delete this simulation element from the simulation.
 SimValue getKey()
          Returns this simulation element external key.
 boolean isDeleted()
          Check the existence of this element.
 void registered(Elements listener)
          Set the listener for property changes and element manager of this element.
 void setKey(SimValue key)
          Set this simulation element external key.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface jasi.sim.basic.id.SimObject
getId, setId
 

Field Detail

COMPARATOR

static final java.util.Comparator<Element> COMPARATOR
Comparison function, which imposes a total ordering of events.

Method Detail

delete

Element delete()
               throws DeleteNotSupportedException
Delete this simulation element from the simulation. All subclasses should either accept its deletion or throw an exception, if the deletion of this simulation element is not supported. The default implementation will throw an exception.

Returns:
The deleted simulation element.
Throws:
DeleteNotSupportedException - This simulation element can not be deleted.
See Also:
AbstractElementBean.acceptDelete()

setKey

void setKey(SimValue key)
Set this simulation element external key. The external key will not change, if already set before. It is used as marker for this simulation element when communicating with external components.

Parameters:
key - The external key.

getKey

SimValue getKey()
Returns this simulation element external key.

Returns:
The external key.

isDeleted

boolean isDeleted()
Check the existence of this element. This method returns true, if the delete-method has been invoked before.

Returns:
True, if element has been deleted.

registered

void registered(Elements listener)
Set the listener for property changes and element manager of this element.

Parameters:
listener - The property change listener.