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

## Class OrderComparator

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

- All Implemented Interfaces:
    Serializable, Comparator<BindingSet>

      public class OrderComparator
      extends Object
      implements Comparator<BindingSet>, Serializable

  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
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OrderComparator(EvaluationStrategy strategy, Order order, ValueComparator vcmp)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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

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

- - ### Constructor Detail

    - #### OrderComparator

          public OrderComparator(EvaluationStrategy strategy,
                                 Order order,
                                 ValueComparator vcmp)

  - ### Method Detail

    - #### compare

          public int compare(BindingSet o1,
                             BindingSet o2)

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

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.