org.deri.iris.builtins.string
Class StringSubstringUntilEndBuiltin
java.lang.Object
org.deri.iris.builtins.AbstractBuiltin
org.deri.iris.builtins.FunctionalBuiltin
org.deri.iris.builtins.string.StringSubstringUntilEndBuiltin
- All Implemented Interfaces:
- Comparable<IAtom>, IAtom, IBuiltinAtom
public class StringSubstringUntilEndBuiltin
- extends FunctionalBuiltin
Represents a string substring operation, but restricts the endIndex to
string.length - 1.
- Author:
- gigi, Adrian Marte
|
Method Summary |
protected ITerm |
computeResult(ITerm[] terms)
Computes the result when all terms but the term at the last position are
known. |
StringSubstringUntilEndBuiltin
public StringSubstringUntilEndBuiltin(ITerm... terms)
- Constructor.
- Parameters:
terms - The terms, where the first term is the string, the second
term is the begin index and the third term represents the
result.
- Throws:
IllegalArgumentException - if one of the terms is null
computeResult
protected ITerm computeResult(ITerm[] terms)
throws EvaluationException
- Description copied from class:
FunctionalBuiltin
- Computes the result when all terms but the term at the last position are
known.
- Specified by:
computeResult in class FunctionalBuiltin
- Parameters:
terms - The terms, where the terms at the last position is a
variable representing the result.
- Returns:
- The computed term, or
null if the operation is
unsuccessful.
- Throws:
EvaluationException - If an error occurs.