Class CollectionContentComparator

  • All Implemented Interfaces:
    java.util.Comparator<java.lang.String>

    public class CollectionContentComparator
    extends java.lang.Object
    implements java.util.Comparator<java.lang.String>
    This comparator allows you to sort a list to be compliant with the natural ordering of content returned by the storage. This may help you to create merged / manual created arrays for collections respecting the order as the storage does.
    Author:
    https://github.com/ljucam [Mario Aerni]
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.String c1, java.lang.String c2)  
      • 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
    • Constructor Detail

      • CollectionContentComparator

        public CollectionContentComparator()
    • Method Detail

      • compare

        public int compare​(java.lang.String c1,
                           java.lang.String c2)
        Specified by:
        compare in interface java.util.Comparator<java.lang.String>