Result

public abstract class Result<Res> extends Object

Data class for holding the result of a tag command.

Constructors

Name Description
public Result()

Methods

getType

public abstract Type getType()

ReturnValue

Name Description
Type

success

public abstract Res success()

ReturnValue

Name Description
Res

failure

public abstract Throwable failure()

ReturnValue

Name Description
Throwable

ofSuccess

public static <Res>Result<Res> ofSuccess(Res response)

Parameters

Name Description
Res response

ReturnValue

Name Description
Result<Res>

ofFailure

public static <Res>Result<Res> ofFailure(Throwable throwable)

Parameters

Name Description
Throwable throwable

ReturnValue

Name Description
Result<Res>