Package org.eclipse.rdf4j.query.algebra.evaluation.util

## Class OrderComparator

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.evaluation.util.OrderComparator

- All Implemented Interfaces:
    `Comparator<BindingSet>`

      public class OrderComparator
      extends Object
      implements Comparator<BindingSet>

  A `Comparator` on `BindingSet`s that imposes a total ordering by examining supplied `Order` elements (i.e. the elements of an ORDER BY clause), falling back on a custom predictable ordering for BindingSet elements if no ordering is established on the basis of the Order elements.
  Author:
    James Leigh, Jeen Broekstra

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `OrderComparator​(EvaluationStrategy strategy, Order order, ValueComparator vcmp, QueryEvaluationContext context)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `compare​(BindingSet o1, BindingSet o2)` |

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

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

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

      `equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong`

- - ### Constructor Detail

    - #### OrderComparator

          public OrderComparator​(EvaluationStrategy strategy,
                                 Order order,
                                 ValueComparator vcmp,
                                 QueryEvaluationContext context)

  - ### Method Detail

    - #### compare

          public int compare​(BindingSet o1,
                             BindingSet o2)

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