Class DynamicCallback<V,P,R>

java.lang.Object
com.pranavpandey.android.dynamic.util.concurrent.DynamicCallback<V,P,R>
Type Parameters:
V - The type of the view.
P - The type of the placeholder.
R - The type of the result.

public abstract class DynamicCallback<V,P,R> extends Object
Callback to retrieve the result dynamically.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor to initialize an object of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the view used by this callback.
    This method will be called to retrieve the placeholder before getting the result.
    abstract R
    onResult(V view)
    This method will be called to retrieve the result from this callback.

    Methods inherited from class java.lang.Object

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

    • DynamicCallback

      public DynamicCallback(@Nullable V view)
      Constructor to initialize an object of this class.
      Parameters:
      view - The view to be used.
  • Method Details

    • onPlaceholder

      @Nullable public P onPlaceholder(@NonNull V view)
      This method will be called to retrieve the placeholder before getting the result.
      Parameters:
      view - The view used by this callback.
      Returns:
      The placeholder from this callback.
    • onResult

      @Nullable public abstract R onResult(@NonNull V view)
      This method will be called to retrieve the result from this callback.
      Parameters:
      view - The view used by this callback.
      Returns:
      The result from this callback.
    • getView

      @Nullable public V getView()
      Returns the view used by this callback.
      Returns:
      The view used by this callback.