org.neo4j.graphdb.traversal
Class Sorting

java.lang.Object
  extended by 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
static Comparator<? super Path> endNodeProperty(String propertyKey)
          Sorts Paths by the property value of each path's end node.
static Comparator<? super Path> endNodeRelationshipCount(PathExpander expander)
          Sorts Paths by the relationship count returned for its end node by the supplied expander.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

endNodeProperty

public static Comparator<? super Path> endNodeProperty(String propertyKey)
Sorts Paths 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 Paths 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-2013 The Neo4j Graph Database Project. All Rights Reserved.