com.hazelcast.util

## Class SortingUtil

- java.lang.Object
- - com.hazelcast.util.SortingUtil

-     public final class SortingUtil
      extends Object

  Utility class for generating Comparators to be used in sort methods specific to hazelcast classes.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `compare(Comparator<Map.Entry> comparator, IterationType iterationType, Map.Entry entry1, Map.Entry entry2)`
    `static boolean` | `compareAnchor(PagingPredicate pagingPredicate, com.hazelcast.query.impl.QueryableEntry queryEntry, Map.Entry<Integer,Map.Entry> nearestAnchorEntry)`
    `static com.hazelcast.internal.util.ResultSet` | `getSortedQueryResultSet(List<Map.Entry> list, PagingPredicate pagingPredicate, IterationType iterationType)`
    `static List<com.hazelcast.query.impl.QueryableEntry>` | `getSortedSubList(List<com.hazelcast.query.impl.QueryableEntry> list, PagingPredicate pagingPredicate, Map.Entry<Integer,Map.Entry> nearestAnchorEntry)`
    `static Comparator<Map.Entry>` | `newComparator(Comparator<Map.Entry> comparator, IterationType iterationType)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### compare

          public static int compare(Comparator<Map.Entry> comparator,
                                    IterationType iterationType,
                                    Map.Entry entry1,
                                    Map.Entry entry2)

    - #### newComparator

          public static Comparator<Map.Entry> newComparator(Comparator<Map.Entry> comparator,
                                                            IterationType iterationType)

    - #### getSortedSubList

          public static List<com.hazelcast.query.impl.QueryableEntry> getSortedSubList(List<com.hazelcast.query.impl.QueryableEntry> list,
                                                                                       PagingPredicate pagingPredicate,
                                                                                       Map.Entry<Integer,Map.Entry> nearestAnchorEntry)

    - #### getSortedQueryResultSet

          public static com.hazelcast.internal.util.ResultSet getSortedQueryResultSet(List<Map.Entry> list,
                                                                                      PagingPredicate pagingPredicate,
                                                                                      IterationType iterationType)

    - #### compareAnchor

          public static boolean compareAnchor(PagingPredicate pagingPredicate,
                                              com.hazelcast.query.impl.QueryableEntry queryEntry,
                                              Map.Entry<Integer,Map.Entry> nearestAnchorEntry)

Copyright © 2019. All rights reserved.