| Modifier and Type | Field and Description |
|---|---|
protected Map<Character,Set<Character>> |
keys |
| Constructor and Description |
|---|
SimpleKeyboard() |
SimpleKeyboard(InputStream is) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
init(InputStream is) |
int |
sequence(String word,
int start)
Detects sequence of keys in word.
|
boolean |
siblings(String word,
int index)
Detects if char next to index is its sibling.
|
boolean |
siblings(String word,
int index,
int isSiblingIndex)
Just as
Keyboard.siblings(String, int), but it accepts index of second char that is a subject to test. |
public SimpleKeyboard()
public SimpleKeyboard(InputStream is)
protected void init(InputStream is)
public boolean siblings(String word, int index)
Keyboardpublic boolean siblings(String word, int index, int isSiblingIndex)
KeyboardKeyboard.siblings(String, int), but it accepts index of second char that is a subject to test. This allows to
detect patterns of keystrokes.public int sequence(String word, int start)
KeyboardKeyboard.siblings(String, int) returns true for 'index', Than this method will
return at least '1' - indcating that after 'index' there is sequence of chars. Example:
String word = "ASDFG"; Keyboard.sequence(word,0) == word.length()-1;
Copyright © 2015 JBoss by Red Hat. All rights reserved.