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

## Class ElementFunctionComparator<V>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.traversal.step.util.ElementFunctionComparator<V>

- All Implemented Interfaces:
    Serializable, Comparator<Element>

      public final class ElementFunctionComparator<V>
      extends Object
      implements Comparator<Element>, Serializable

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElementFunctionComparator(Function<Element,V> elementFunction, Comparator<V> valueComparator)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compare(Element elementA, Element elementB)`
    `Function<Element,V>` | `getElementFunction()`
    `Comparator<V>` | `getValueComparator()`
    `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

    - #### ElementFunctionComparator

          public ElementFunctionComparator(Function<Element,V> elementFunction,
                                           Comparator<V> valueComparator)

  - ### Method Detail

    - #### getElementFunction

          public Function<Element,V> getElementFunction()

    - #### getValueComparator

          public Comparator<V> getValueComparator()

    - #### compare

          public int compare(Element elementA,
                             Element elementB)

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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