public enum StringComparator extends java.lang.Enum<StringComparator>
Enum Constant and Description |
---|
Exact
to compare s1 with s2.
|
In
to check whether s1 contains s2?
|
Prefix
to compare s1 for s2 as prefix.
|
RegExp
compare s1 with regexp, s2 will be treated as regexp
|
Suffix
to compare s1 for s2 as suffix.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compare(java.lang.String s1,
java.lang.String s2) |
boolean |
compareIgnoreCase(java.lang.String s1,
java.lang.String s2) |
static StringComparator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StringComparator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringComparator Exact
public static final StringComparator Prefix
public static final StringComparator Suffix
public static final StringComparator In
public static final StringComparator RegExp
public static StringComparator[] values()
for (StringComparator c : StringComparator.values()) System.out.println(c);
public static StringComparator valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean compare(java.lang.String s1, java.lang.String s2)
public boolean compareIgnoreCase(java.lang.String s1, java.lang.String s2)
Copyright © 2000 Infostretch Corp.