public final class WildCard
extends java.lang.Object
History:
Modifier and Type | Field and Description |
---|---|
static char |
BEGIN
a character symbol for represetning the beginning of a string
|
static char |
CONSONANT
a character symbol for representing a consonant
|
static char |
DIGIT
a character symbol for representing a digit [0-9]
|
static char |
END
a character symbol for represetning the end of a string
|
static char |
FS
a character symbol for representing a field separator
|
static char |
LETTER
a character symbol for representing a letter [a-z]
|
static char |
SAME_AS_PREV
a character symbol for representing a same character as the following
character in the string
|
static char |
VOWEL
a character symbol for representing a vowel: [a,e,i,o,u]
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
GetSuffix(java.lang.String inSuffix,
java.lang.String outSuffix,
java.lang.String inStr)
Get a string with modified suffix from a specified string by giving
the in suffix and out suffix of a rule to be applied.
|
static boolean |
IsMatchKey(char key,
int index,
char[] inCharArray)
Check if a specific key matches a character of a suffix.
|
static boolean |
IsWildCard(char inChar)
Check if a specific character belong ot a pre-defined wild card.
|
static void |
main(java.lang.String[] args)
test driver for this class.
|
static char |
WildCardTransform(char inChar)
Transform a specific character to a wildCard
|
static java.lang.String |
WildCardTransform(java.lang.String inStr)
Transform a specific string to a string consist of wildcard.
|
public static final char VOWEL
public static final char CONSONANT
public static final char SAME_AS_PREV
public static final char DIGIT
public static final char LETTER
public static final char BEGIN
public static final char END
public static final char FS
public static java.lang.String GetSuffix(java.lang.String inSuffix, java.lang.String outSuffix, java.lang.String inStr)
inSuffix
- the matching suffix of input termoutSuffix
- the generated output suffixinStr
- the string will be modified it's suffixpublic static boolean IsMatchKey(char key, int index, char[] inCharArray)
key
- the key character to be checked for matchingindex
- the index of character in the input array for matchinginCharArray
- a character array to represent a suffixpublic static char WildCardTransform(char inChar)
inChar
- the character to be transform to a wild cardpublic static java.lang.String WildCardTransform(java.lang.String inStr)
inStr
- the string to be transformed to wild cardspublic static boolean IsWildCard(char inChar)
inChar
- the character to be test for a wild cardpublic static void main(java.lang.String[] args)
args
- arguments