code: public static Criteria criteriaFromNode(Node node, Comparator rangeComparator) {
          return criteriaFromNode(node, rangeComparator, null);
      }
docs: Creates criteria from a node. A Comparator is injected into all nodes which need to determine order or equality.