Package com.singularsys.jep.configurableparser.matchers

# Class SingleArgFunctionMatcher

java.lang.Object
com.singularsys.jep.configurableparser.matchers.SingleArgFunctionMatcher

All Implemented Interfaces:
  `GrammarMatcher`, `Serializable`

public class SingleArgFunctionMatcher extends Object implements GrammarMatcher
A matcher for functions like "sin 30" without brackets and a single simple argument.

Since:
  3.5
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SingleArgFunctionMatcher(Token open)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `init(Jep jep)`
  Delayed initialisation, this method is called whenever components of the jep instance are changed.
  `Node`
  `match(Lookahead2Iterator<Token> it, GrammarParser parser)`
  Test whether the input matches this pattern.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### SingleArgFunctionMatcher

    public SingleArgFunctionMatcher(Token open)
    Constructor
    Parameters:
      `open` - token for normal functions like "sin(x)", if the open token is detected then match will return null

- ## Method Details

  - ### match

    public Node match(Lookahead2Iterator<Token> it, GrammarParser parser) throws ParseException
    Description copied from interface: `GrammarMatcher`
    Test whether the input matches this pattern.
    Specified by:
      `match` in interface `GrammarMatcher`
    Parameters:
      `it` - An iterator inspecting the input
      `parser` - the parser to use when evaluating sub expressions
    Returns:
      if matched returns a node representing the content, return null is does not match
    Throws:
      `ParseException` - if there is a syntactical error in the input.

  - ### init

    public void init(Jep jep)
    Description copied from interface: `GrammarMatcher`
    Delayed initialisation, this method is called whenever components of the jep instance are changed.
    Specified by:
      `init` in interface `GrammarMatcher`
    Parameters:
      `jep` - the current jep instance.