MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / compare

Method compare

src/org/opensourcephysics/display/DataTable.java:2471–2476  ·  view source on GitHub ↗
(Object[] a, Object[] b)

Source from the content-addressed store, hash-verified

2469
2470 private static Comparator<Object[]> nCompare = new Comparator<Object[]>() {
2471 @Override
2472 public int compare(Object[] a, Object[] b) {
2473 return (a[0] != null && b[0] != null
2474 ? Double.compare(((Number)a[0]).doubleValue(), ((Number)b[0]).doubleValue())
2475 : a[0] != null ? -1 : b[0] != null ? 1 : 0);
2476 }
2477 };
2478 private static Comparator<Object[]> sCompare = new Comparator<Object[]>() {
2479 @Override

Callers 3

binarySearchMethod · 0.45
insertionsortMethod · 0.45
mergeMethod · 0.45

Calls 3

doubleValueMethod · 0.80
compareToMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected