Class ListenerRegistration<T>


  • public class ListenerRegistration<T>
    extends java.lang.Object
    A simple wrapper around a listener and an executor, with some utility methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.util.concurrent.Executor executor  
      T listener  
    • Constructor Summary

      Constructors 
      Constructor Description
      ListenerRegistration​(T listener, java.util.concurrent.Executor executor)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> boolean removeFromList​(T listener, java.util.List<? extends ListenerRegistration<T>> list)
      Returns true if the listener was removed, else false.
      • Methods inherited from class java.lang.Object

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

      • listener

        public final T listener
      • executor

        public final java.util.concurrent.Executor executor
    • Constructor Detail

      • ListenerRegistration

        public ListenerRegistration​(T listener,
                                    java.util.concurrent.Executor executor)
    • Method Detail

      • removeFromList

        public static <T> boolean removeFromList​(T listener,
                                                 java.util.List<? extends ListenerRegistration<T>> list)
        Returns true if the listener was removed, else false.