org.apache.tinkerpop.gremlin.util.function

## Class ScriptEngineLambda

- java.lang.Object
- - org.apache.tinkerpop.gremlin.util.function.ScriptEngineLambda

- All Implemented Interfaces:
    BiConsumer, Consumer, Function, Predicate, Supplier, TriConsumer

      public final class ScriptEngineLambda
      extends Object
      implements Function, Supplier, Consumer, Predicate, BiConsumer, TriConsumer

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ScriptEngine` | `engine`
    `protected String` | `script`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScriptEngineLambda(String engineName, String script)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `accept(Object a)`
    `void` | `accept(Object a, Object b)`
    `void` | `accept(Object a, Object b, Object c)` Performs this operation on the given arguments.
    `Object` | `apply(Object a)`
    `Object` | `get()`
    `boolean` | `test(Object a)`

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

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

    - ### Methods inherited from interface java.util.function.Function

      `andThen, compose, identity`

    - ### Methods inherited from interface java.util.function.Consumer

      `andThen`

    - ### Methods inherited from interface java.util.function.Predicate

      `and, isEqual, negate, or`

    - ### Methods inherited from interface java.util.function.BiConsumer

      `andThen`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.util.function.TriConsumer

      `andThen`

- - ### Field Detail

    - #### engine

          protected final ScriptEngine engine

    - #### script

          protected final String script

  - ### Constructor Detail

    - #### ScriptEngineLambda

          public ScriptEngineLambda(String engineName,
                                    String script)

  - ### Method Detail

    - #### apply

          public Object apply(Object a)

      Specified by:
        `apply` in interface `Function`

    - #### get

          public Object get()

      Specified by:
        `get` in interface `Supplier`

    - #### accept

          public void accept(Object a)

      Specified by:
        `accept` in interface `Consumer`

    - #### accept

          public void accept(Object a,
                             Object b)

      Specified by:
        `accept` in interface `BiConsumer`

    - #### accept

          public void accept(Object a,
                             Object b,
                             Object c)

      Description copied from interface: `TriConsumer`
      Performs this operation on the given arguments.
      Specified by:
        `accept` in interface `TriConsumer`
      Parameters:
        `a` - the first argument to the operation
        `b` - the second argument to the operation
        `c` - the third argument to the operation

    - #### test

          public boolean test(Object a)

      Specified by:
        `test` in interface `Predicate`

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.