Class KVStoreSequentialComparator

  • All Implemented Interfaces:
    java.util.Comparator<org.api4.java.datastructure.kvstore.IKVStore>

    public class KVStoreSequentialComparator
    extends java.lang.Object
    implements java.util.Comparator<org.api4.java.datastructure.kvstore.IKVStore>
    This comparator may be used to sort KVStore objects in a KVStoreCollection according to the values for the specified keys. The KVStores are then compared successively for the provided keys and ordered in ascending order.
    • Constructor Summary

      Constructors 
      Constructor Description
      KVStoreSequentialComparator​(java.lang.String... sortKeys)
      Default c'tor initializing the comparator for a set of keys for which the kvstores are to be sorted.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(org.api4.java.datastructure.kvstore.IKVStore arg0, org.api4.java.datastructure.kvstore.IKVStore arg1)  
      • 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

      • KVStoreSequentialComparator

        public KVStoreSequentialComparator​(java.lang.String... sortKeys)
        Default c'tor initializing the comparator for a set of keys for which the kvstores are to be sorted.
        Parameters:
        sortKeys - The array of keys for which to sort the KVStoreCollection.
    • Method Detail

      • compare

        public int compare​(org.api4.java.datastructure.kvstore.IKVStore arg0,
                           org.api4.java.datastructure.kvstore.IKVStore arg1)
        Specified by:
        compare in interface java.util.Comparator<org.api4.java.datastructure.kvstore.IKVStore>