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 java.lang.ObjectCallback 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 VgetView()Returns the view used by this callback.PonPlaceholder(V view)This method will be called to retrieve the placeholder before getting the result.abstract RonResult(V view)This method will be called to retrieve the result from this callback.
-
-
-
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.
-
-