- All Superinterfaces:
ContextEvent,Events.Event
Interface representing an
ContextEvent that occurs when an environment property changes.-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> voidapplyOnMatch(String property, Consumer<T> action) Applies a given action if the specified property name matches and the property value is assignable to the given type.Gets the name of the property that changed.getValue()Gets the value of the property after the change has occurred.
-
Method Details
-
getProperty
String getProperty()Gets the name of the property that changed.- Returns:
- the name of the changed property
-
getValue
Object getValue()Gets the value of the property after the change has occurred.- Returns:
- the new value of the changed property
-
applyOnMatch
Applies a given action if the specified property name matches and the property value is assignable to the given type.- Type Parameters:
T- the type parameter.- Parameters:
property- the name of the property to check.action- the consumer action to be performed if conditions are satisfied.
-