org.apache.tinkerpop.gremlin.process.traversal.step.util

## Class FunctionComparator<A,B>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.step.util.FunctionComparator<A,B>

- All Implemented Interfaces:
    Serializable, Comparator<A>

      public final class FunctionComparator<A,B>
      extends Object
      implements Comparator<A>, Serializable

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FunctionComparator(Function<A,B> function, Comparator<B> comparator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(A first, A second)`
    `Comparator<B>` | `getComparator()`
    `Function<A,B>` | `getFunction()`
    `String` | `toString()`

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

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

    - ### Methods inherited from interface java.util.Comparator

      `comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### FunctionComparator

          public FunctionComparator(Function<A,B> function,
                                    Comparator<B> comparator)

  - ### Method Detail

    - #### getFunction

          public Function<A,B> getFunction()

    - #### getComparator

          public Comparator<B> getComparator()

    - #### compare

          public int compare(A first,
                             A second)

      Specified by:
        `compare` in interface `Comparator<A>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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