Enum Class SPSCharacterSet
- All Implemented Interfaces:
Serializable
,Comparable<SPSCharacterSet>
,Constable
The character set defines the allowed characters in the various payment fields.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionExtended Latin character set.Full Unicode character set.Restrictive character set from the original Swiss Payment Standard and original QR bill specification. -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(char ch) Returns if this characters set contains the specified character.boolean
contains
(int codePoint) Returns if this characters set contains the specified Unicode code point.static SPSCharacterSet
Returns the enum constant of this class with the specified name.static SPSCharacterSet[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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
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
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 nameNullPointerException
- 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
-