Package org.opentcs.data
Klasse TCSObjectEvent
java.lang.Object
org.opentcs.data.TCSObjectEvent
- Alle implementierten Schnittstellen:
Serializable
Instances of this class represent events emitted by/for business objects.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypKlasseBeschreibungstatic enum
Indicates the type of an event, which can be helpful with filtering events. -
Konstruktorübersicht
KonstruktorBeschreibungTCSObjectEvent
(TCSObject<?> currentObjectState, TCSObject<?> previousObjectState, TCSObjectEvent.Type eventType) Creates a new TCSObjectEvent. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungTCSObject
<?> Returns the current state of the object for which this event was created.TCSObject
<?> Returns the current state of the object for which this event was created, or, if the current state isnull
, the previous state.TCSObject
<?> Returns the previous state of the object for which this event was created.getType()
Returns this event's type.toString()
-
Konstruktordetails
-
TCSObjectEvent
public TCSObjectEvent(TCSObject<?> currentObjectState, TCSObject<?> previousObjectState, TCSObjectEvent.Type eventType) Creates a new TCSObjectEvent.- Parameter:
currentObjectState
- The current state of the object for which this event was created. Value is irrelevant/may benull
ifeventType
isOBJECT_REMOVED
.previousObjectState
- The previous state of the object for which this event was created.Value is irrelevant/may benull
ifeventType
isOBJECT_CREATED
.eventType
- The event's type.- Löst aus:
NullPointerException
- IfeventType
isnull
.IllegalArgumentException
- If eithercurrentObjectState
orpreviousObjectState
isnull
whileeventType
does not have an appropriate value.
-
-
Methodendetails
-
getCurrentObjectState
Returns the current state of the object for which this event was created.- Gibt zurück:
- The current state of the object for which this event was created.
-
getPreviousObjectState
Returns the previous state of the object for which this event was created.- Gibt zurück:
- The previous state of the object for which this event was created.
-
getCurrentOrPreviousObjectState
Returns the current state of the object for which this event was created, or, if the current state isnull
, the previous state.- Gibt zurück:
- The current or the previous state of the object for which this event was created.
-
getType
Returns this event's type.- Gibt zurück:
- This event's type.
-
toString
-