public class BasicCharacterPattern extends Object implements CharacterPattern
CharacterPattern.Matching
Constructor and Description |
---|
BasicCharacterPattern(KeyStroke result,
char... pattern)
Creates a new BasicCharacterPattern that matches a particular sequence of characters into a
KeyStroke |
Modifier and Type | Method and 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)
KeyStroke
result
- KeyStroke
that this pattern will translate topattern
- Sequence of characters that translates into the KeyStroke
public char[] getPattern()
public KeyStroke getResult()
public CharacterPattern.Matching match(List<Character> seq)
CharacterPattern
match
in interface CharacterPattern
seq
- of characters to checkMatching
Copyright © 2016. All rights reserved.