Package org.bitcoinj.utils
Class ListenerRegistration<T>
- java.lang.Object
-
- org.bitcoinj.utils.ListenerRegistration<T>
-
public class ListenerRegistration<T> extends java.lang.Object
A simple wrapper around a listener and an executor, with some utility methods.
-
-
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.
-
-
-
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.
-
-