Enum Class SPSCharacterSet

java.lang.Object
java.lang.Enum<SPSCharacterSet>
net.codecrete.qrbill.generator.SPSCharacterSet
All Implemented Interfaces:
Serializable, Comparable<SPSCharacterSet>, Constable

public enum SPSCharacterSet extends Enum<SPSCharacterSet>
Swiss Payment Standard character set.

The character set defines the allowed characters in the various payment fields.

  • Enum Constant Details

    • LATIN_1_SUBSET

      public static final SPSCharacterSet LATIN_1_SUBSET
      Restrictive character set from the original Swiss Payment Standard and original QR bill specification.

      Valid characters consist of a subset of the printable Latin-1 characters in the Unicode blocks Basic Latin and Latin-1 Supplement.

    • EXTENDED_LATIN

      public static final SPSCharacterSet EXTENDED_LATIN
      Extended Latin character set.

      Valid characters are all printable characters from the Unicode blocks Basic Latin (Unicode codePoints U+0020 to U+007E), Latin-1 Supplement (Unicode codePoints U+00A0 to U+00FF) and Latin Extended A (Unicode codePoints U+0100 to U+017F) plus a few additional characters (such as the Euro sign).

      This character set has been introduced with SPS 2022 (November 18, 2022) but may not be used in QR bills until November 21, 2025 when all banks are ready to accept messages with this character set.

    • FULL_UNICODE

      public static final SPSCharacterSet FULL_UNICODE
      Full Unicode character set.

      This character set may be used when decoding the QR code text. It is not suitable for generating QR bills or payment messages in general, and it is not covered by the Swiss Payment Standard.

  • Method Details

    • values

      public static SPSCharacterSet[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SPSCharacterSet valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • contains

      public boolean contains(char ch)
      Returns if this characters set contains the specified character.
      Parameters:
      ch - character
      Returns:
      true if the character is in this character set, false otherwise
    • contains

      public boolean contains(int codePoint)
      Returns if this characters set contains the specified Unicode code point.
      Parameters:
      codePoint - Unicode code point
      Returns:
      true if the code point is in this character set, false otherwise