Package-level declarations
Contains all the types, functions and properties that can be used in the Karith API.
Types
Common builder interface for KthContext.Builder and KthModule.Builder.
Represents exceptions that can be thrown while calculating the result, after parsing the expression.
Constant token to be included in a KthModule or KthContext and used in an expression.
Contexts are the main entrypoint of the Karith API. Their primary function is to parse strings into expressions, which can then be calculated to obtain a result.
Common interface for KthOperator, KthFunction and KthConstant.
Base class for all exceptions thrown by Karith.
Expressions contain all the data needed to calculate an arithmetic expression when given input variables (if any are needed).
Function token to be included in a KthModule or KthContext and used in an expression.
Thrown during tokenization if the input string contains an illegal token.
Thrown during calculation if a function / operator doesn't have enough arguments / operands.
Thrown during token sorting if the input string contains mismatched parentheses.
A module is a collection of KthElements to be included in a KthContext.
Operator token to be included in a KthModule or KthContext and used in an expression.
Represents exceptions that can be thrown while parsing the expression, before calculating the result.
Base interface for all tokens can be parsed in a KthExpression.
Thrown during tokenization if the input string requires a combiner operator and the context does not provide one.
Thrown during calculation if an input variable is not defined.
Thrown during calculation if it encounters an unknown token.
Functions
Helper function to create a KthConstant using the receiving String as key.
Helper function to create a KthFunction with one argument using the receiving String as key.
Helper function to create a KthFunction with two arguments using the receiving String as key.
Helper function to create a KthFunction using the receiving String as key.
Helper function to create a KthOperator using the receiving String as key.
Helper function to build a KthContext.
Parses an arithmetic expression from the given string using the default context, then return its result.
Parses an arithmetic expression from the receiving string using the default context, then return its result.
Parses an arithmetic expression from the given string using the default context, then return its result.
Parses an arithmetic expression from the receiving string using the default context, then return its result.
Helper function to create a KthConstant.
Helper function to create a KthFunction with one argument.
Helper function to create a KthFunction with two arguments.
Helper function to create a KthFunction.
Helper function to create a KthOperator.
Parses an arithmetic expression from the given string using the default context.
Parses an arithmetic expression from the receiving string using the default context.
Parses an arithmetic expression from the given string and declared variables using the default context.
Parses an arithmetic expression from the receiving string and declared variables using the default context.
Helper function to add the Operators.POWER operator to a KthContext builder.