public static enum CString.StringLengthComparator extends Enum<CString.StringLengthComparator> implements Comparator<String>
Enum Constant and Description |
---|
INSTANCE
The singleton instance.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(String left,
String right)
Compares the length of the supplied Strings.
|
static CString.StringLengthComparator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CString.StringLengthComparator[] |
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 CString.StringLengthComparator INSTANCE
public static CString.StringLengthComparator[] values()
for (CString.StringLengthComparator c : CString.StringLengthComparator.values()) System.out.println(c);
public static CString.StringLengthComparator 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 String to compare.right
- The right String to compare.Copyright © 2008–2018. All rights reserved.