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

## Interface ComparatorHolder<S,C extends Comparable>

- All Known Implementing Classes:
    OrderGlobalStep, OrderLocalStep

      public interface ComparatorHolder<S,C extends Comparable>

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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addComparator(Traversal.Admin<S,C> traversal, Comparator<C> comparator)` Add a `Traversal`-based `Comparator` to the holder.
    `List<<any>>` | `getComparators()` Get the comparators associated with this holder.

- - ### Method Detail

    - #### addComparator

          void addComparator(Traversal.Admin<S,C> traversal,
                             Comparator<C> comparator)

      Add a `Traversal`-based `Comparator` to the holder. If no traversal is needed, use `IdentityTraversal`.
      Parameters:
        `traversal` - the traversal to pre-process the object by.
        `comparator` - the comparator to compare the result of the object after traversal processing

    - #### getComparators

          List<<any>> getComparators()

      Get the comparators associated with this holder. The comparators are ordered according to their oder of operation.
      Returns:
        a list of `Traversal`/`Comparator`-pairs

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