public class LineComparator extends Object implements Comparator<Line>
Line without line ending; forwards the comparison of
the content string to a delegate string comparator. Some constants exist for
common line comparators.| Constructor and Description |
|---|
LineComparator(boolean ignoreCase,
boolean ignoreLeadingBlanks,
boolean onlyDictionaryChars)
Constructor with options for line comparision.
|
LineComparator(Comparator<? super String> comparator)
Constructor for a line comparator that uses the specified
comparator to compare the content
string of the line. |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Line line1,
Line line2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic LineComparator(Comparator<? super String> comparator)
comparator to compare the content
string of the line.comparator - the comparator used to compare the line content stringpublic LineComparator(boolean ignoreCase, boolean ignoreLeadingBlanks, boolean onlyDictionaryChars)
ignoreCase - true to ignore case, false for case sensitive comparisonignoreLeadingBlanks - true if leading blanks shall be trimmed before the comparisononlyDictionaryChars - true if only blanks and alphanumeric characters shall be consideredCopyright © 2025. All rights reserved.