fm.liveswitch.IPromise Interface Reference

Interface for a promise that can be rejected. More...

Public Member Functions

abstract boolean castAndResolve (Object result)
 Casts the result and resolves the promise. More...
 
abstract boolean reject (java.lang.Exception exception)
 Rejects the promise. More...
 

Detailed Description

Interface for a promise that can be rejected.

Member Function Documentation

◆ castAndResolve()

abstract boolean fm.liveswitch.IPromise.castAndResolve ( Object  result)
abstract

Casts the result and resolves the promise.

Will throw an exception if the cast fails.

Parameters
resultThe result.

Implemented in fm.liveswitch.PromiseBase< T >.

◆ reject()

abstract boolean fm.liveswitch.IPromise.reject ( java.lang.Exception  exception)
abstract

Rejects the promise.

Parameters
exceptionThe exception.

Implemented in fm.liveswitch.PromiseBase< T >.