Interface Function

All Superinterfaces:
org.djutils.base.Identifiable
All Known Implementing Classes:
F0, F1, F2

public interface Function extends org.djutils.base.Identifiable
Function.java. Description and implementation of a function that can be registered in and then executed by the Eval evaluator.

Copyright (c) 2023-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.

Author:
Peter Knoppers
  • Method Summary

    Modifier and Type
    Method
    Description
    function(Object[] arguments)
    The function itself.
    default String
    Return a textual description of the function.
    org.djutils.metadata.MetaData
    Specifies the types of the arguments expected by the function.
    default String
    Return the name of the function.

    Methods inherited from interface org.djutils.base.Identifiable

    getId
  • Method Details

    • getName

      default String getName()
      Return the name of the function.
      Returns:
      String; the name of the function
    • getDescription

      default String getDescription()
      Return a textual description of the function.
      Returns:
      String; description of the function (may use html tags).
    • getMetaData

      org.djutils.metadata.MetaData getMetaData()
      Specifies the types of the arguments expected by the function.
      Returns:
      MetaData; specification of the arguments expected by the function
    • function

      Object function(Object[] arguments) throws RuntimeException
      The function itself.
      Parameters:
      arguments - Object[]; the arguments of the function
      Returns:
      Object; the result of the function (must currently be either some type of DoubleScalar or Boolean).
      Throws:
      RuntimeException - thrown when the function is unable to produce a result