Interface GeckoResult.OnValueMapper<T,U>

Type Parameters:
T - Type of the value delivered via onValue(T)
U - Type of the new value returned by onValue(T)
Enclosing class:
GeckoResult<T>

public static interface GeckoResult.OnValueMapper<T,U>
An interface used to map GeckoResult values.
  • Method Summary

    Modifier and Type
    Method
    Description
    onValue(T value)
    Called when a GeckoResult is completed with a value.
  • Method Details

    • onValue

      @AnyThread @Nullable U onValue(@Nullable T value) throws Throwable
      Called when a GeckoResult is completed with a value. Will be called on the same thread where the GeckoResult was created or on the Handler provided via GeckoResult.withHandler(Handler).
      Parameters:
      value - The value of the GeckoResult
      Returns:
      Value used to complete the next result in the chain. May be null.
      Throws:
      Throwable - Exception used to complete next result in the chain.