Package org.djutils.eval
Interface Function
- All Superinterfaces:
org.djutils.base.Identifiable
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
Methods inherited from interface org.djutils.base.Identifiable
getId
-
Method Details
-
getName
Return the name of the function.- Returns:
- String; the name of the function
-
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
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
-