public final class Result extends Object
| Modifier and Type | Method and Description |
|---|---|
@NotNull Result |
addMessage(@Nullable String message)
Adds an additional error message text
|
static Result |
build(@NotNull Error error)
Builds a new instance of an operation result
|
static Result |
build(@NotNull Error error,
@Nullable Exception exception)
Creates a new instance of an operation result
|
static Result |
build(@NotNull Error error,
int exitCode)
Builds a new instance of an operation result
|
int |
getCode()
Gets the error code of the result
|
@NotNull Error |
getError()
Gets the error of the result
|
@Nullable Exception |
getException()
Returns the exception behind the result
|
@NotNull String |
getMessage()
Gets the error message of the result
|
boolean |
isError()
Is this result an error?
|
public static Result build(@NotNull @NotNull Error error)
error - wrapped error codepublic static Result build(@NotNull @NotNull Error error, int exitCode)
error - wrapped error codeexitCode - wrapped exit codepublic static Result build(@NotNull @NotNull Error error, @Nullable @Nullable Exception exception)
error - wrapped error codeexception - wrapped exceptionpublic boolean isError()
@NotNull public @NotNull Error getError()
public int getCode()
@NotNull public @NotNull String getMessage()
@Nullable public @Nullable Exception getException()
Copyright © 2017–2022 SoftVision Development GmbH, Fulda, Germany. All rights reserved.