Skip to content

Instantly share code, notes, and snippets.

@maxdemarzi
Created April 16, 2014 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxdemarzi/10804828 to your computer and use it in GitHub Desktop.
Save maxdemarzi/10804828 to your computer and use it in GitHub Desktop.
import org.neo4j.graphdb.Node;
import java.util.Comparator;
import java.util.Map;
/**
* @author mh
* @since 16.03.14
*/
public class MutableIntEntryComparator implements Comparator<Map.Entry<Node, MutableInt>> {
@Override
public int compare(Map.Entry<Node, MutableInt> o1, Map.Entry<Node, MutableInt> o2) {
// Reverse Order.
return o2.getValue().compareTo(o1.getValue());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment