public enum MatchBehavior extends Enum<MatchBehavior>
Enum Constant and Description |
---|
Contains
|
EndsWith
|
StartsWith
|
Modifier and Type | Method and Description |
---|---|
boolean |
match(String text,
char c)
Returns whether text matches the supplied string for this match type.
|
boolean |
match(String text,
String s)
Returns whether text matches the supplied string for this match type.
|
String |
toString() |
String |
upperSnakeName()
Returns the name of this match behavior in upper case snake casing.
|
static MatchBehavior |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MatchBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MatchBehavior StartsWith
public static final MatchBehavior EndsWith
public static final MatchBehavior Contains
public static MatchBehavior[] values()
for (MatchBehavior c : MatchBehavior.values()) System.out.println(c);
public static MatchBehavior 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 String upperSnakeName()
public boolean match(String text, char c)
text
- to searchc
- to find in textpublic boolean match(String text, String s)
text
- to searchs
- to find in textpublic String toString()
toString
in class Enum<MatchBehavior>
Copyright © 2003-2024 Virginia Tech. All Rights Reserved.