CharacterPatternpublic class BasicCharacterPattern extends Object implements CharacterPattern
CharacterPattern.Matching| Constructor | Description |
|---|---|
BasicCharacterPattern(KeyStroke result,
char... pattern) |
Creates a new BasicCharacterPattern that matches a particular sequence of characters into a
KeyStroke |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object obj) |
|
char[] |
getPattern() |
Returns the characters that makes up this pattern, as an array that is a copy of the array used internally
|
KeyStroke |
getResult() |
Returns the keystroke that this pattern results in
|
int |
hashCode() |
|
CharacterPattern.Matching |
match(List<Character> seq) |
Given a list of characters, determine whether it exactly matches
any known KeyStroke, and whether a longer sequence can possibly match.
|
public BasicCharacterPattern(KeyStroke result, char... pattern)
KeyStrokeresult - KeyStroke that this pattern will translate topattern - Sequence of characters that translates into the KeyStrokepublic char[] getPattern()
public KeyStroke getResult()
public CharacterPattern.Matching match(List<Character> seq)
CharacterPatternmatch in interface CharacterPatternseq - of characters to checkMatchingCopyright © 2020. All rights reserved.