public class LineComparator extends java.lang.Object implements java.util.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(java.util.Comparator<? super java.lang.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) |
public LineComparator(java.util.Comparator<? super java.lang.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 © 2021. All Rights Reserved.