public enum ParagraphComparator extends Enum<ParagraphComparator> implements Comparator<String>
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(String left,
String right)
Compares two paragraph numbers.
|
static ParagraphComparator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ParagraphComparator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final ParagraphComparator INSTANCE
public static ParagraphComparator[] values()
for (ParagraphComparator c : ParagraphComparator.values()) System.out.println(c);
public static ParagraphComparator valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int compare(String left, String right)
compare
in interface Comparator<String>
left
- The left paragraph number to compare.right
- The right paragraph to compare.NumberFormatException
- When either the left or the right paragraph number contains a non numeric character.Copyright © 2008–2018. All rights reserved.