Class XmlElement.NodeComparator

  • All Implemented Interfaces:
    java.util.Comparator<org.w3c.dom.Node>
    Enclosing class:
    XmlElement

    private static class XmlElement.NodeComparator
    extends java.lang.Object
    implements java.util.Comparator<org.w3c.dom.Node>
    A (attribute) node comparator based on XML attributes.
    Author:
    Holger Eichelberger
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.HashMap<java.lang.String,​java.lang.Integer> pos  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NodeComparator​(XmlAttribute[] attributes)
      Creates the comparator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(org.w3c.dom.Node o1, org.w3c.dom.Node o2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • pos

        private java.util.HashMap<java.lang.String,​java.lang.Integer> pos
    • Constructor Detail

      • NodeComparator

        private NodeComparator​(XmlAttribute[] attributes)
        Creates the comparator.
        Parameters:
        attributes - the attributes in sequence
    • Method Detail

      • compare

        public int compare​(org.w3c.dom.Node o1,
                           org.w3c.dom.Node o2)
        Specified by:
        compare in interface java.util.Comparator<org.w3c.dom.Node>