- java.lang.Object
-
- com.googlecode.lanterna.input.NormalCharacterPattern
-
- All Implemented Interfaces:
CharacterPattern
public class NormalCharacterPattern extends java.lang.Object implements CharacterPattern
Character pattern that matches one character as one KeyStroke with the character that was read
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.googlecode.lanterna.input.CharacterPattern
CharacterPattern.Matching
-
-
Constructor Summary
Constructors Constructor Description NormalCharacterPattern()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
isPrintableChar(char c)
From http://stackoverflow.com/questions/220547/printable-char-in-javaCharacterPattern.Matching
match(java.util.List<java.lang.Character> seq)
Given a list of characters, determine whether it exactly matches any known KeyStroke, and whether a longer sequence can possibly match.
-
-
-
Method Detail
-
match
public CharacterPattern.Matching match(java.util.List<java.lang.Character> seq)
Description copied from interface:CharacterPattern
Given a list of characters, determine whether it exactly matches any known KeyStroke, and whether a longer sequence can possibly match.- Specified by:
match
in interfaceCharacterPattern
- Parameters:
seq
- of characters to check- Returns:
- see
Matching
-
isPrintableChar
private static boolean isPrintableChar(char c)
From http://stackoverflow.com/questions/220547/printable-char-in-java- Parameters:
c
- character to test- Returns:
- True if this is a 'normal', printable character, false otherwise
-
-