Class ProbeEvent<T>

java.lang.Object
java.util.EventObject
edu.wisc.ssec.mcidasv.probes.ProbeEvent<T>
All Implemented Interfaces:
Serializable

public class ProbeEvent<T> extends EventObject
This class captures a change to a probe and stores both the previous and current (as of the event's creation) changed values.
See Also:
  • Field Details

    • oldValue

      private final T oldValue
      Previous value of the probe.
    • newValue

      private final T newValue
      Current value of the probe.
  • Constructor Details

    • ProbeEvent

      public ProbeEvent(ReadoutProbe source, T oldValue, T newValue)
      Generated when a ReadoutProbe changes either its position, color, or visibility. Currently stores either position, color, or visibility both before and after the change.
      Parameters:
      source - Probe that generated this event.
      oldValue - Old value of the probe.
      newValue - New value of the probe.
      Throws:
      NullPointerException - if any parameters are null.
  • Method Details

    • getProbe

      Returns the probe that generated this event.
      Returns:
      Probe from which this event originated.
    • getOldValue

      public T getOldValue()
      Returns the value of the probe before this event was generated.
      Returns:
      Previous probe value.
    • getNewValue

      public T getNewValue()
      Returns the current (as of this event) value of the probe.
      Returns:
      Current probe value.
    • toString

      public String toString()
      Returns a brief summary of this event. Please note that this format is subject to change.
      Overrides:
      toString in class EventObject
      Returns:
      String that looks like [ProbeEvent@HASHCODE: source=..., oldValue=..., newValue=...].