Package org.apache.johnzon.jsonb.order
Class PerHierarchyAndLexicographicalOrderFieldComparator
- java.lang.Object
-
- org.apache.johnzon.jsonb.order.PerHierarchyAndLexicographicalOrderFieldComparator
-
- All Implemented Interfaces:
Comparator<String>
public class PerHierarchyAndLexicographicalOrderFieldComparator extends Object implements Comparator<String>
-
-
Field Summary
Fields Modifier and Type Field Description private Class<?>clazzprivate Map<String,Integer>distancesprivate static Comparator<String>NULLS_LASTprivate AtomicBooleanpopulated
-
Constructor Summary
Constructors Constructor Description PerHierarchyAndLexicographicalOrderFieldComparator(Class<?> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(String o1, String o2)private voidpopulateDistances()-
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
-
NULLS_LAST
private static final Comparator<String> NULLS_LAST
-
clazz
private final Class<?> clazz
-
populated
private final AtomicBoolean populated
-
-
Constructor Detail
-
PerHierarchyAndLexicographicalOrderFieldComparator
public PerHierarchyAndLexicographicalOrderFieldComparator(Class<?> clazz)
-
-
Method Detail
-
compare
public int compare(String o1, String o2)
- Specified by:
comparein interfaceComparator<String>
-
populateDistances
private void populateDistances()
-
-