jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.apidiscovery.interfaces
Interface ValidateResult<T>

Type Parameters:
T - Type of the validated parameter
All Known Implementing Classes:
Validators.InvalidResult

public interface ValidateResult<T>

Result of a parameter validation.

Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Note that the usage of Validators currently not supported.

Author:
Gabor Imre

Method Summary
 String getMessageForInvalid()
          Get description in case of an invalid parameter value.
 boolean isValid()
          Check if the validated value is valid.
 Optional<T> suggestValid()
          Suggest a valid value if possible.
 

Method Detail

isValid

boolean isValid()
Check if the validated value is valid.

Returns:
True if the validated value is valid

getMessageForInvalid

String getMessageForInvalid()
                            throws IllegalStateException
Get description in case of an invalid parameter value.

Returns:
Description dependent of the cause of invalidity
Throws:
IllegalStateException - when called on a valid result

suggestValid

Optional<T> suggestValid()
                         throws IllegalStateException
Suggest a valid value if possible.

Returns:
A valid value if one can be easily and trivially constructed
Throws:
IllegalStateException - when called on a valid result

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)