public class WordPattern extends Object
Represents a word pattern.
Constructor and Description |
---|
WordPattern()
Initializes a new instance of the
WordPattern class. |
Modifier and Type | Method and Description |
---|---|
void |
appendCharacter(char character)
Appends a character to the word pattern.
|
void |
appendOneCharacterWildcard()
Appends one character wildcard to the word pattern.
|
void |
appendOneOrMoreCharactersWildcard()
Appends one or more characters wildcard to the word pattern.
|
void |
appendString(String text)
Appends a string to the word pattern.
|
void |
appendWildcard(int min,
int max)
Appends a wildcard to the word pattern.
|
void |
appendZeroOrMoreCharactersWildcard()
Appends zero or more characters wildcard to the word pattern.
|
void |
appendZeroOrOneCharacterWildcard()
Appends zero or one character wildcard to the word pattern.
|
String |
toString()
Returns a
System.String that represents the current WordPattern . |
public WordPattern()
Initializes a new instance of the WordPattern
class.
public final void appendString(String text)
Appends a string to the word pattern.
text
- The string to append.public final void appendCharacter(char character)
Appends a character to the word pattern.
character
- The character to append.public final void appendOneCharacterWildcard()
Appends one character wildcard to the word pattern.
public final void appendZeroOrOneCharacterWildcard()
Appends zero or one character wildcard to the word pattern.
public final void appendZeroOrMoreCharactersWildcard()
Appends zero or more characters wildcard to the word pattern.
public final void appendOneOrMoreCharactersWildcard()
Appends one or more characters wildcard to the word pattern.
public final void appendWildcard(int min, int max)
Appends a wildcard to the word pattern.
min
- The minimum number of characters.max
- The maximum number of characters.Copyright © 2019. All rights reserved.