Class 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 java.lang.Object
    Callback to retrieve the result dynamically.
    • Constructor Summary

      Constructors 
      Constructor Description
      DynamicCallback​(V view)
      Constructor to initialize an object of this class.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      V getView()
      Returns the view used by this callback.
      P onPlaceholder​(V view)
      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 Detail

      • DynamicCallback

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

      • 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.