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