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<org.javatuples.Pair<Traversal.Admin<S,C>,Comparator<C>>>` | `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<org.javatuples.Pair<Traversal.Admin<S,C>,Comparator<C>>> 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–2022 Apache Software Foundation. All rights reserved.