Package com.sodius.oslc.client.requests
Class Validations.ValidationResult<T>
- java.lang.Object
-
- com.sodius.oslc.client.requests.Validations.ValidationResult<T>
-
- Type Parameters:
T
- the type of resource retrieved during validation.
- Enclosing class:
- Validations
public static class Validations.ValidationResult<T> extends Object
The result of a validation, which is either the retrieved resource or a message explaining the validation error.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorMessage()
Returns the message explaining the validation error.T
getResult()
Returns the retrieved resources as a result of the validation.boolean
isValid()
Determines if validation was successful,in which casegetResult()
returns the retrieved resource andgetErrorMessage()
isnull
.
-
-
-
Method Detail
-
isValid
public boolean isValid()
Determines if validation was successful,in which casegetResult()
returns the retrieved resource andgetErrorMessage()
isnull
.- Returns:
true
if validation is successful,false
otherwise.
-
getErrorMessage
public String getErrorMessage()
Returns the message explaining the validation error.- Returns:
- the message explaining the validation error,
null
if validation is successful.
-
getResult
public T getResult()
Returns the retrieved resources as a result of the validation.- Returns:
- the retrieved resource,
null
if validation is not a success.
-
-