private void updateInternalMask() throws ParseException {
  String mask=getMask();
  ArrayList<MaskCharacter> fixed=new ArrayList<MaskCharacter>();
  ArrayList<MaskCharacter> temp=fixed;
  if (mask != null) {
    for (int counter=0, maxCounter=mask.length(); counter < maxCounter; counter++) {
      char maskChar=mask.charAt(counter);
switch (maskChar) {
case DIGIT_KEY:
        temp.add(new DigitMaskCharacter());
      break;
case LITERAL_KEY:
    if (++counter < maxCounter) {
      maskChar=mask.charAt(counter);
      temp.add(new LiteralCharacter(maskChar));
    }
  break;
case UPPERCASE_KEY:
temp.add(new UpperCaseCharacter());
break;
case LOWERCASE_KEY:
temp.add(new LowerCaseCharacter());
break;
case ALPHA_NUMERIC_KEY:
temp.add(new AlphaNumericCharacter());
break;
case CHARACTER_KEY:
temp.add(new CharCharacter());
break;
case ANYTHING_KEY:
temp.add(new MaskCharacter());
break;
case HEX_KEY:
temp.add(new HexCharacter());
break;
default :
temp.add(new LiteralCharacter(maskChar));
break;
}
}
}
if (fixed.size() == 0) {
maskChars=EmptyMaskChars;
}
 else {
maskChars=new MaskCharacter[fixed.size()];
fixed.toArray(maskChars);
}
}

private void updateInternalMask ( ) throws ParseException { String mask = getMask ( ) ; ArrayList < MaskCharacter > fixed = new ArrayList < MaskCharacter > ( ) ; ArrayList < MaskCharacter > temp = fixed ; if ( mask != null ) { for ( int counter = 0 , maxCounter = mask . length ( ) ; counter < maxCounter ; counter ++ ) { char maskChar = mask . charAt ( counter ) ; switch ( maskChar ) { case DIGIT_KEY : temp . add ( new DigitMaskCharacter ( ) ) ; break ; case LITERAL_KEY : if ( ++ counter < maxCounter ) { maskChar = mask . charAt ( counter ) ; temp . add ( new LiteralCharacter ( maskChar ) ) ; } break ; case UPPERCASE_KEY : temp . add ( new UpperCaseCharacter ( ) ) ; break ; case LOWERCASE_KEY : temp . add ( new LowerCaseCharacter ( ) ) ; break ; case ALPHA_NUMERIC_KEY : temp . add ( new AlphaNumericCharacter ( ) ) ; break ; case CHARACTER_KEY : temp . add ( new CharCharacter ( ) ) ; break ; case ANYTHING_KEY : temp . add ( new MaskCharacter ( ) ) ; break ; case HEX_KEY : temp . add ( new HexCharacter ( ) ) ; break ; default : temp . add ( new LiteralCharacter ( maskChar ) ) ; break ; } } } if ( fixed . size ( ) == 0 ) { maskChars = EmptyMaskChars ; } else { maskChars = new MaskCharacter [ fixed . size ( ) ] ; fixed . toArray ( maskChars ) ; } }
updates the internal representation of the mask .
