Class SchemaNodeMap.DocOrderComparator

java.lang.Object
org.dlese.dpc.xml.schema.SchemaNodeMap.DocOrderComparator
All Implemented Interfaces:
Comparator
Enclosing class:
SchemaNodeMap

public class SchemaNodeMap.DocOrderComparator extends Object implements Comparator
Comparator to sort the keyMap in document order. Element paths are processed in doc order, so we map the paths to an incrementing counter, and then maintain the map's order using the counter values.
Author:
Jonathan Ostwald
  • Constructor Details

    • DocOrderComparator

      public DocOrderComparator()
  • Method Details

    • compare

      public int compare(Object o1, Object o2)
      sorts by order in which paths are processed by StructureWalker (and therefore are added to the SchemaNodeMap)
      Specified by:
      compare in interface Comparator
      Parameters:
      o1 - NOT YET DOCUMENTED
      o2 - NOT YET DOCUMENTED
      Returns:
      NOT YET DOCUMENTED