Class ListenerRegistration<T>

java.lang.Object
org.bitcoinj.utils.ListenerRegistration<T>

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

    • listener

      public final T listener
    • executor

      public final Executor executor
  • Constructor Details

    • ListenerRegistration

      public ListenerRegistration(T listener, Executor executor)
  • Method Details

    • removeFromList

      public static <T> boolean removeFromList(T listener, List<? extends ListenerRegistration<T>> list)
      Remove wrapped listener
      Type Parameters:
      T -
      Parameters:
      listener - listener to remove
      list - list to remove it from
      Returns:
      true if the listener was removed, else false.