error

@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>): @NotNull DataResult<T>(source)

Creates an error DataResult with the given error message supplier and no partial result.

Parameters

message

The error message supplier

<T>

The type of the result a successful DataResult would return

See also

DataResult

@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull partialResult: @NotNull T): @NotNull DataResult<T>(source)

Creates an error DataResult with the given error message supplier and a partial result.

Parameters

message

The error message supplier

partialResult

The partial or fallback result

<T>

The type of the result a successful DataResult would return

See also

DataResult

@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull lifecycle: @NotNull Lifecycle): @NotNull DataResult<T>(source)

Creates an error DataResult with the given error message supplier and lifecycle.

Parameters

message

The error message supplier

lifecycle

The lifecycle to use

<T>

The type of the result a successful DataResult would return

See also

DataResult

@NotNull
abstract fun <T> error(@NotNull message: @NotNull Supplier<String>, @NotNull partialResult: @NotNull T, @NotNull lifecycle: @NotNull Lifecycle): @NotNull DataResult<T>(source)

Creates an error DataResult with the given error message supplier, partial result, and lifecycle.

Parameters

message

The error message supplier

partialResult

The partial or fallback result

lifecycle

The lifecycle to use

<T>

The type of the result a successful DataResult would return

See also

DataResult