com.jstatcom.model
Class SymbolEvent
- java.lang.Object
-
- com.jstatcom.model.SymbolEvent
-
public class SymbolEvent extends java.lang.ObjectEvents of this type are fired bySymbolobjects to notify listeners about changes of various kinds. Instances of this class are constructed via the staticvalueOffactory methods.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.ObjectgetNewValue()Gets the value after the change.java.lang.ObjectgetOldValue()Gets the value before the change.SymbolgetSource()Gets the data object where the event was fired from.SymbolEventTypesgetType()Gets the type of this event.booleanisSourceEmpty()Gets the value after the change as aboolean.java.lang.StringtoString()Gets a string representation of this.static SymbolEventvalueOfEmptyState(Symbol source, boolean isEmptyNow)Gets an instance of this for events of typeSymbolEventTypes.EMPTY_STATE.static SymbolEventvalueOfJSCDataEvent(Symbol source, JSCDataEvent evt)Gets an instance of this for events of typeJSCDataEvent.static SymbolEventvalueOfValChanged(Symbol source, java.lang.Object oldValue, java.lang.Object newValue)Gets an instance of this for events of typeSymbolEventTypes.VALUE_CHANGED.
-
-
-
Method Detail
-
getNewValue
public final java.lang.Object getNewValue()
Gets the value after the change.- Returns:
- an arbitrary object
-
isSourceEmpty
public final boolean isSourceEmpty()
Gets the value after the change as aboolean.- Returns:
trueif new value is aBooleanthat is true,falseotherwise
-
getOldValue
public final java.lang.Object getOldValue()
Gets the value before the change.- Returns:
- an arbitrary object
-
getSource
public final Symbol getSource()
Gets the data object where the event was fired from.- Returns:
- a
Symbolobject
-
getType
public final SymbolEventTypes getType()
Gets the type of this event.- Returns:
- one of
SymbolEventTypes
-
toString
public java.lang.String toString()
Gets a string representation of this.- Overrides:
toStringin classjava.lang.Object- Returns:
- informative string representation
-
valueOfEmptyState
public static SymbolEvent valueOfEmptyState(Symbol source, boolean isEmptyNow)
Gets an instance of this for events of typeSymbolEventTypes.EMPTY_STATE.- Parameters:
source- the source from which the event is firedisEmptyNow-trueif source is empty- Returns:
- a cleared event
-
valueOfJSCDataEvent
public static SymbolEvent valueOfJSCDataEvent(Symbol source, JSCDataEvent evt)
Gets an instance of this for events of typeJSCDataEvent. This method translates aJSCDataEventinto aSymbolEvent.- Parameters:
source- the source from which the event is firedevt- theJSCDataEventto be translated to aSymbolEvent- Returns:
- a symbol event
-
valueOfValChanged
public static SymbolEvent valueOfValChanged(Symbol source, java.lang.Object oldValue, java.lang.Object newValue)
Gets an instance of this for events of typeSymbolEventTypes.VALUE_CHANGED.- Parameters:
source- the source from which the event is firedoldValue- the value before the changenewValue- the value after the change- Returns:
- a changed event
-
-
DMelt 3.0 © DataMelt by jWork.ORG