IDataResultFactory

A factory class for DataResult.

Functions

Link copied to clipboard
@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>): @NotNull DataResult<T>
Creates an error DataResult with the given error message supplier and no partial result.
@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull partialResult: @NotNull T): @NotNull DataResult<T>
Creates an error DataResult with the given error message supplier and a partial result.
@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull lifecycle: @NotNull Lifecycle): @NotNull DataResult<T>
Creates an error DataResult with the given error message supplier and lifecycle.
@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull partialResult: @NotNull T, @NotNull lifecycle: @NotNull Lifecycle): @NotNull DataResult<T>
Creates an error DataResult with the given error message supplier, partial result, and lifecycle.
Link copied to clipboard
@NotNull
open fun getInstance(): @NotNull IDataResultFactory
Returns the implementation of IDataResultFactory.
Link copied to clipboard
@NotNull
abstract fun <T> success(@NotNull result: @NotNull T): @NotNull DataResult<T>
Creates a successful DataResult with the given result.
@NotNull
abstract fun <T> success(@NotNull result: @NotNull T, @NotNull lifecycle: @NotNull Lifecycle): @NotNull DataResult<T>
Creates a successful DataResult with the given results and lifecycle.