Interface ConfigEvent


public interface ConfigEvent
These events are triggered from the Config class each time something is added, updated or removed.
Author:
Federico Vera <[email protected]>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    A new value was added to the Config object
    static final int
    A value as been removed from the Config object
    static final int
    An existing value was updated
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the key that triggered the event
    int
    Retrieves the type of change that has happened
    Retrieves the new value associated with this key
    Retrieves the old value associated with this key
    boolean
    Tells if the value affects a given key, basically:
  • Field Details

  • Method Details

    • getChangeType

      int getChangeType()
      Retrieves the type of change that has happened
      Returns:
      type of change
      See Also:
    • isKey

      boolean isKey(String key)
      Tells if the value affects a given key, basically:
       if (evt.isKey("my.key")){
           //...
       }
      
       is equivalent to:
      
       if (evt.getChangedKey().equals("my.key") {
           //...
       }
       
      Parameters:
      key - the key to compare
      Returns:
      true if key is the key that triggered the event and false otherwise
      See Also:
    • getChangedKey

      String getChangedKey()
      Retrieves the key that triggered the event
      Returns:
      key
    • getOldValue

      Object getOldValue()
      Retrieves the old value associated with this key
      Returns:
      old value
    • getNewValue

      Object getNewValue()
      Retrieves the new value associated with this key
      Returns:
      new value