public RegExKeyPressHandler(final String pregEx) { super(RegExUtil.getAllowedCharactersForRegEx(pregEx), true); } }
public RegExKeyPressHandler(final String pregEx) { super(RegExUtil.getAllowedCharactersForRegEx(pregEx), true); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = TaxNumberKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil.getAllowedCharactersForRegEx( TaxNumberKeyPressHandler.TAX_NUMBER_MAP.taxNumbers().get(countryCode))); TaxNumberKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = TinKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil .getAllowedCharactersForRegEx(TinKeyPressHandler.TIN_MAP.tins().get(countryCode))); TinKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = VatIdKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil .getAllowedCharactersForRegEx(VatIdKeyPressHandler.VATID_MAP.vatIds().get(countryCode))); VatIdKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = PostalCodeKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil.getAllowedCharactersForRegEx( PostalCodeKeyPressHandler.POSTAL_CODE_MAP.postalCodes().get(countryCode))); PostalCodeKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = TaxNumberKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil.getAllowedCharactersForRegEx( TaxNumberKeyPressHandler.TAX_NUMBER_MAP.taxNumbers().get(countryCode))); TaxNumberKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = VatIdKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil .getAllowedCharactersForRegEx(VatIdKeyPressHandler.VATID_MAP.vatIds().get(countryCode))); VatIdKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = PostalCodeKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil.getAllowedCharactersForRegEx( PostalCodeKeyPressHandler.POSTAL_CODE_MAP.postalCodes().get(countryCode))); PostalCodeKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }
@Override public boolean isAllowedCharacter(final char pcharacter) { final String countryCode = StringUtils.upperCase(Objects.toString(countryCodeField.getValue())); final Set<Character> currentCharacterSet = TinKeyPressHandler.ALLOWED_CHRACTERS.get(countryCode); if (currentCharacterSet == null) { this.setAllowedCharacters(RegExUtil .getAllowedCharactersForRegEx(TinKeyPressHandler.TIN_MAP.tins().get(countryCode))); TinKeyPressHandler.ALLOWED_CHRACTERS.put(countryCode, getAllowedCharacters()); } else { this.setAllowedCharacters(currentCharacterSet); } return super.isAllowedCharacter(pcharacter); } }