Class BrowseTermComparator
java.lang.Object
io.goobi.viewer.model.termbrowsing.BrowseTermComparator
- All Implemented Interfaces:
Serializable
,Comparator<BrowseTerm>
Custom string comparator for browsing terms (case-insensitive, ignores brackets, natural sorting).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(BrowseTerm o1, BrowseTerm o2) static String
normalizeString
(String str, String ignoreChars) 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 Details
-
BrowseTermComparator
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<BrowseTerm>
- Parameters:
o1
-o2
-
-
normalizeString
- Parameters:
str
- String to normalizeignoreChars
- Optional string containing leading characters to remove from the string- Returns:
- Cleaned-up string for comparison
-