Class ChangeEvent<T>


  • public class ChangeEvent<T>
    extends java.lang.Object
    Event that is thrown in case of a bdi element change (belief, goal, etc.).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BELIEFCHANGED
      Event type that a belief value has changed (the whole value was changed).
      static java.lang.String FACTADDED
      Event type that a fact has been added.
      static java.lang.String FACTCHANGED
      Event type that a fact has changed (property change in case of bean).
      static java.lang.String FACTREMOVED
      Event type that a fact has been removed.
      static java.lang.String GOALACTIVE
      Event type that a goal has been added.
      static java.lang.String GOALADOPTED
      Event type that a goal has been added.
      static java.lang.String GOALDROPPED
      Event type that a goal has been removed.
      static java.lang.String GOALINPROCESS
      Event type that a goal has been added.
      static java.lang.String GOALNOTINPROCESS
      Event type that a goal has been removed.
      static java.lang.String GOALOPTION
      Event type that a goal has been optionized.
      static java.lang.String GOALSUSPENDED
      Event type that a goal has been suspended.
      protected java.lang.Object info
      The change identifier, e.g.
      static java.lang.String PARAMETERCHANGED
      Event type that a parameter value has changed (the whole value was changed).
      static java.lang.String PLANADOPTED
      Event type that a plan has been added.
      static java.lang.String PLANFINISHED
      Event type that a plan has been finished.
      protected java.lang.Object source
      The event source.
      protected java.lang.String type
      The event type.
      protected T value
      The event value.
      static java.lang.String VALUEADDED
      Event type that a value has been added.
      static java.lang.String VALUECHANGED
      Event type that a value has changed (property change in case of bean).
      static java.lang.String VALUEREMOVED
      Event type that a value has been removed.
    • Constructor Summary

      Constructors 
      Constructor Description
      ChangeEvent()
      Create a new ChangeEvent.
      ChangeEvent​(IEvent event)
      Create a new ChangeEvent.
      ChangeEvent​(java.lang.String type, java.lang.Object source, T value, java.lang.Object info)
      Create a new event.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getInfo()
      Get the info.
      java.lang.Object getSource()
      Get the source.
      java.lang.String getType()
      Get the type.
      T getValue()
      Get the value.
      void setInfo​(java.lang.Object info)
      Set the info.
      void setSource​(java.lang.Object source)
      Set the source.
      void setType​(java.lang.String type)
      Set the type.
      void setValue​(T value)
      Set the value.
      java.lang.String toString()
      Get the string representation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • FACTADDED

        public static final java.lang.String FACTADDED
        Event type that a fact has been added.
        See Also:
        Constant Field Values
      • FACTREMOVED

        public static final java.lang.String FACTREMOVED
        Event type that a fact has been removed.
        See Also:
        Constant Field Values
      • FACTCHANGED

        public static final java.lang.String FACTCHANGED
        Event type that a fact has changed (property change in case of bean).
        See Also:
        Constant Field Values
      • BELIEFCHANGED

        public static final java.lang.String BELIEFCHANGED
        Event type that a belief value has changed (the whole value was changed).
        See Also:
        Constant Field Values
      • VALUEADDED

        public static final java.lang.String VALUEADDED
        Event type that a value has been added.
        See Also:
        Constant Field Values
      • VALUEREMOVED

        public static final java.lang.String VALUEREMOVED
        Event type that a value has been removed.
        See Also:
        Constant Field Values
      • VALUECHANGED

        public static final java.lang.String VALUECHANGED
        Event type that a value has changed (property change in case of bean).
        See Also:
        Constant Field Values
      • PARAMETERCHANGED

        public static final java.lang.String PARAMETERCHANGED
        Event type that a parameter value has changed (the whole value was changed).
        See Also:
        Constant Field Values
      • GOALADOPTED

        public static final java.lang.String GOALADOPTED
        Event type that a goal has been added.
        See Also:
        Constant Field Values
      • GOALDROPPED

        public static final java.lang.String GOALDROPPED
        Event type that a goal has been removed.
        See Also:
        Constant Field Values
      • GOALACTIVE

        public static final java.lang.String GOALACTIVE
        Event type that a goal has been added.
        See Also:
        Constant Field Values
      • GOALOPTION

        public static final java.lang.String GOALOPTION
        Event type that a goal has been optionized.
        See Also:
        Constant Field Values
      • GOALSUSPENDED

        public static final java.lang.String GOALSUSPENDED
        Event type that a goal has been suspended.
        See Also:
        Constant Field Values
      • GOALINPROCESS

        public static final java.lang.String GOALINPROCESS
        Event type that a goal has been added.
        See Also:
        Constant Field Values
      • GOALNOTINPROCESS

        public static final java.lang.String GOALNOTINPROCESS
        Event type that a goal has been removed.
        See Also:
        Constant Field Values
      • PLANADOPTED

        public static final java.lang.String PLANADOPTED
        Event type that a plan has been added.
        See Also:
        Constant Field Values
      • PLANFINISHED

        public static final java.lang.String PLANFINISHED
        Event type that a plan has been finished.
        See Also:
        Constant Field Values
      • type

        protected java.lang.String type
        The event type.
      • source

        protected java.lang.Object source
        The event source.
      • value

        protected T value
        The event value.
      • info

        protected java.lang.Object info
        The change identifier, e.g. index or key.
    • Constructor Detail

      • ChangeEvent

        public ChangeEvent()
        Create a new ChangeEvent.
      • ChangeEvent

        public ChangeEvent​(java.lang.String type,
                           java.lang.Object source,
                           T value,
                           java.lang.Object info)
        Create a new event.
        Parameters:
        type -
        source -
        value -
      • ChangeEvent

        public ChangeEvent​(IEvent event)
        Create a new ChangeEvent.
    • Method Detail

      • getType

        public java.lang.String getType()
        Get the type.
        Returns:
        The type.
      • setType

        public void setType​(java.lang.String type)
        Set the type.
        Parameters:
        type - The type to set.
      • getSource

        public java.lang.Object getSource()
        Get the source.
        Returns:
        The source.
      • setSource

        public void setSource​(java.lang.Object source)
        Set the source.
        Parameters:
        source - The source to set.
      • getValue

        public T getValue()
        Get the value.
        Returns:
        The value.
      • setValue

        public void setValue​(T value)
        Set the value.
        Parameters:
        value - The value to set.
      • getInfo

        public java.lang.Object getInfo()
        Get the info.
        Returns:
        The info.
      • setInfo

        public void setInfo​(java.lang.Object info)
        Set the info.
        Parameters:
        info - The info to set.
      • toString

        public java.lang.String toString()
        Get the string representation.
        Overrides:
        toString in class java.lang.Object