Class NormalCharacterPattern

java.lang.Object
com.googlecode.lanterna.input.NormalCharacterPattern
All Implemented Interfaces:
CharacterPattern

public class NormalCharacterPattern extends Object implements CharacterPattern
Character pattern that matches one character as one KeyStroke with the character that was read
  • Constructor Details

    • NormalCharacterPattern

      public NormalCharacterPattern()
  • Method Details

    • match

      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 interface CharacterPattern
      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