Interface Calculator<T,R>

Type Parameters:
T - type of the input data for calculation
R - type of the result of calculation
All Superinterfaces:
TaggedCalculator
All Known Implementing Classes:
DipoleCalculator, NMRCalculator, ProgressableCalculator

@PublicApi public interface Calculator<T,R> extends TaggedCalculator
Generic calculator interface
  • Method Summary

    Modifier and Type
    Method
    Description
    calculate(T data)
    Calculates with the given data
    check(T data)
    Checks if the given data is usable for the calculator or not

    Methods inherited from interface chemaxon.calculations.api.TaggedCalculator

    tags
  • Method Details

    • check

      List<CalculatorError> check(T data)
      Checks if the given data is usable for the calculator or not
      Parameters:
      data - the input data
      Returns:
      list of errors. The molecule is valid when the list is empty.
    • calculate

      R calculate(T data) throws IllegalArgumentException
      Calculates with the given data
      Parameters:
      data - the input data
      Returns:
      the calculation result
      Throws:
      IllegalArgumentException - when the molecule is not usable
      See Also: