Package 

Class EventObserver

  • All Implemented Interfaces:
    androidx.lifecycle.Observer

    
    public final class EventObserver<T extends Object>
     implements Observer<Event<T>>
                        

    An Observer for Events, simplifying the pattern of checking if the Event's content has already been handled.

    onEventUnhandledContent is only called if the Event's contents has not been handled.

    • Constructor Summary

      Constructors 
      Constructor Description
      EventObserver(Function1<T, Unit> onEventUnhandledContent)
    • Method Summary

      Modifier and Type Method Description
      Unit onChanged(Event<T> event)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EventObserver

        EventObserver(Function1<T, Unit> onEventUnhandledContent)