FunctionDefinitionMap (The Unity library)
Date: 2014-05-13

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.me.nxg.unity
Class FunctionDefinitionMap

    java.lang.Object
      uk.me.nxg.unity.FunctionDefinitionMap

    public abstract class FunctionDefinitionMap

extends Object

Provides a mapping from function abbreviations to function definitions.

This is a singleton class, so clients must first obtain the instance of the class using `getInstance()`.

Method Summary
`static FunctionDefinitionMap` | `getInstance()` Obtain an instance of the function-definition map.
`static FunctionDefinition` | `lookupFunctionDefinition(Syntax syntax, String functionName)` Return the FunctionDefinition corresponding to a name, in a particular syntax.
`static String` | `lookupFunctionName(Syntax syntax, FunctionDefinition fd)` Return the name corresponding to a function definition in a particular syntax.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static FunctionDefinitionMap getInstance()

  Obtain an instance of the function-definition map.

### lookupFunctionDefinition

    public static FunctionDefinition lookupFunctionDefinition(Syntax syntax,
                                                              String functionName)

  Return the FunctionDefinition corresponding to a name, in a particular syntax. Returns null if the function is not known in this syntax.

  Parameters:
    `syntax` - one of the syntaxes of `Syntax`
    `functionName` - the name of the function (eg "log") to be looked up

### lookupFunctionName

    public static String lookupFunctionName(Syntax syntax,
                                            FunctionDefinition fd)

  Return the name corresponding to a function definition in a particular syntax. The 'name' is the name of the function for display, for example `log` for Logarithm, and this is in principle syntax-specific (though in fact there is no variation between syntaxes).

  Parameters:
    `syntax` - one of the syntaxes of `Syntax`
    `fd` - the definition of the function, which we want the name of
  Returns:
    the name of a function, for display

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD