Class MapComparator

  • All Implemented Interfaces:
    java.util.Comparator<java.util.Map<java.lang.Object,​java.lang.Object>>

    public class MapComparator
    extends java.lang.Object
    implements java.util.Comparator<java.util.Map<java.lang.Object,​java.lang.Object>>
    MapComparator.java
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Constructor Description
      MapComparator​(java.util.List<? extends java.lang.Object> keys)
      Method MapComparator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.util.Map<java.lang.Object,​java.lang.Object> map1, java.util.Map<java.lang.Object,​java.lang.Object> map2)  
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      • Methods inherited from class java.lang.Object

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

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

      • module

        public static final java.lang.String module
    • Constructor Detail

      • MapComparator

        public MapComparator​(java.util.List<? extends java.lang.Object> keys)
        Method MapComparator.
        Parameters:
        keys - List of Map keys to sort on
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Comparator<java.util.Map<java.lang.Object,​java.lang.Object>>
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compare

        public int compare​(java.util.Map<java.lang.Object,​java.lang.Object> map1,
                           java.util.Map<java.lang.Object,​java.lang.Object> map2)
        Specified by:
        compare in interface java.util.Comparator<java.util.Map<java.lang.Object,​java.lang.Object>>
        See Also:
        Comparator.compare(java.lang.Object, java.lang.Object)