Class MaskConverter<C>

Type Parameters:
C -
All Implemented Interfaces:
Serializable, IConverter<C>, IClusterable

public class MaskConverter<C> extends Object implements IConverter<C>
A converter that takes a mask into account. It is specifically meant for overrides on individual components, that provide their own converter by returning it from Component#getConverter(Class). It uses an instance of MaskFormatter to delegate the masking and unmasking to.

The following characters can be specified (adopted from the MaskFormatter documentation):



# Any valid number, uses Character.isDigit.
' Escape character, used to escape any of the special formatting characters.
U Any character (Character.isLetter). All lowercase letters are mapped to upper case.
L Any character (Character.isLetter). All upper case letters are mapped to lower case.
A Any character or number (Character.isLetter or Character.isDigit)
? Any character (Character.isLetter).
H Any hex character (0-9, a-f or A-F).

Typically characters correspond to one char, but in certain languages this is not the case. The mask is on a per character basis, and will thus adjust to fit as many chars as are needed.

Eelco Hillenius
See Also: