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 StringgetErrorMessage()Returns the message explaining the validation error.TgetResult()Returns the retrieved resources as a result of the validation.booleanisValid()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:
trueif validation is successful,falseotherwise.
-
getErrorMessage
public String getErrorMessage()
Returns the message explaining the validation error.- Returns:
- the message explaining the validation error,
nullif validation is successful.
-
getResult
public T getResult()
Returns the retrieved resources as a result of the validation.- Returns:
- the retrieved resource,
nullif validation is not a success.
-
-