Interface IFunction

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractBetweenFunction, AbstractDatePartFunction, AbstractIncrementFunction, Annuity, Avg, Capitalize, Concat, ConvertToBoolean, ConvertToCurrency, ConvertToDate, ConvertToDateTime, ConvertToInteger, ConvertToList, ConvertToNumber, ConvertToNumericBase, ConvertToPercentage, ConvertToText, Count, Date, DateString, DateTime, Day, DayOfWeek, DaysBetween, Difference, Equals, Exists, Find, Guid, Hour, HoursBetween, IncrementDays, IncrementHours, IncrementMinutes, IncrementMonths, IncrementSeconds, IncrementWeeks, IncrementYears, IndexOf, Intersection, IsNullFunction, IsUnknownFunction, LastIndexOf, Logarithm, LowerCase, Match, Max, Min, Minute, MinutesBetween, Month, MonthsBetween, Product, Replace, RoundFunction, RoundSigFunction, Second, SecondsBetween, Size, Split, StrBack, StrConcat, StrFront, StringLength, SubString, SubStringAfter, SubStringBefore, Sum, SymmetricDifference, Today, Trim, Union, Unique, UpperCase, WeekNumber, WeeksBetween, WorkingDaysBetween, Year, YearsBetween

public interface IFunction extends Serializable
Interface for functions that can be used in expressions.
Since:
5.0
Author:
O. Kerpershoek, F. van der Meer
  • Method Summary

    Modifier and Type
    Method
    Description
    This method is used to determine the result type of the function using the type information of the parameters that will be passed to the function.
    This method should execute the function using the supplied arguments.
    This method returns an array containing the definitions of the arguments the function expects.
    This method returns the name of the function.
    boolean
    This method returns a boolean indicating that the function is deprecated and should no longer be used.
  • Method Details

    • getName

      String getName()
      This method returns the name of the function.
      Returns:
      the name of the function.
    • getArguments

      IArgumentType[] getArguments()
      This method returns an array containing the definitions of the arguments the function expects. When the function does not accept any arguments at all, an empty array should be returned.
      Returns:
      Array containing the definitions of the parameters.
    • evaluate

      IValue evaluate(IArgumentList arguments)
      This method should execute the function using the supplied arguments.
      Parameters:
      arguments - The arguments for the function.
      Returns:
      The result of the function.
      Throws:
      ExpressionException - This exception is thrown when the function could not be invoked with the supplied arguments.
    • determineResultType

      Type determineResultType(ISemanticNode... arguments)
      This method is used to determine the result type of the function using the type information of the parameters that will be passed to the function.
      Parameters:
      arguments - The type information of the parameters.
      Returns:
      The result type of the function.
    • isDeprecated

      boolean isDeprecated()
      This method returns a boolean indicating that the function is deprecated and should no longer be used. Functions that are not deprecated should return the value false.
      Returns:
      A message indicating that the function is deprecated.