Interface ConversionResult

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      AtomicValue asAtomic()
      Calling this method on a ConversionResult returns the AtomicValue that results from the conversion if the conversion was successful, and throws a ValidationException explaining the conversion error otherwise.
    • Method Detail

      • asAtomic

        AtomicValue asAtomic()
                      throws ValidationException
        Calling this method on a ConversionResult returns the AtomicValue that results from the conversion if the conversion was successful, and throws a ValidationException explaining the conversion error otherwise.

        Use this method if you are calling a conversion method that returns a ConversionResult, and if you want to throw an exception if the conversion fails.

        Returns:
        the atomic value that results from the conversion if the conversion was successful
        Throws:
        ValidationException - if the conversion was not successful