Class SimpleLifecycled<T>
java.lang.Object
sawfowl.regionguard.implementsapi.worldedit.cui.handle.utils.SimpleLifecycled<T>
- All Implemented Interfaces:
Lifecycled<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface sawfowl.regionguard.implementsapi.worldedit.cui.handle.utils.Lifecycled
Lifecycled.Events<T> -
Method Summary
Modifier and TypeMethodDescriptionevents()Get the event manager for this lifecycled object.static <T> SimpleLifecycled<T>invalid()voidRemove the value of this lifecycled and fire the invalidated event.voidSet the value of this lifecycled and fire the new value event.static <T> SimpleLifecycled<T>valid(T value) value()Get the value orOptional.empty().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sawfowl.regionguard.implementsapi.worldedit.cui.handle.utils.Lifecycled
filter, flatMap, isValid, map, valueOrThrow
-
Method Details
-
valid
-
invalid
-
newValue
Set the value of this lifecycled and fire the new value event.- Parameters:
value- the value
-
invalidate
public void invalidate()Remove the value of this lifecycled and fire the invalidated event. -
value
Description copied from interface:LifecycledGet the value orOptional.empty().- Specified by:
valuein interfaceLifecycled<T>- Returns:
- the value
-
events
Description copied from interface:LifecycledGet the event manager for this lifecycled object.- Specified by:
eventsin interfaceLifecycled<T>- Returns:
- the event manager
-