Sorting (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.graphdb.traversal

## Class Sorting

- java.lang.Object
- - org.neo4j.graphdb.traversal.Sorting

-     public abstract class Sorting
      extends Object

  Provides some common traversal sorting, used by `TraversalDescription.sort(Comparator)`.
  Author:
    Mattias Persson

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Comparator<? super Path>` | `endNodeProperty(String propertyKey)` Sorts `Path`s by the property value of each path's end node.
    `static Comparator<? super Path>` | `endNodeRelationshipCount(PathExpander expander)` Sorts `Path`s by the relationship count returned for its end node by the supplied `expander`.

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

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

- - ### Method Detail

    - #### endNodeProperty

          public static Comparator<? super Path> endNodeProperty(String propertyKey)

      Sorts `Path`s by the property value of each path's end node.
      Parameters:
        `propertyKey` - the property key of the values to sort on.
      Returns:
        a `Comparator` suitable for sorting traversal results.

    - #### endNodeRelationshipCount

          public static Comparator<? super Path> endNodeRelationshipCount(PathExpander expander)

      Sorts `Path`s by the relationship count returned for its end node by the supplied `expander`.
      Parameters:
        `expander` - the `PathExpander` to use for getting relationships off of each `Path`'s end node.
      Returns:
        a `Comparator` suitable for sorting traversal results.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.