Skip to content

Commit

Permalink
Exposed pattern mask.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrriis committed Jul 6, 2013
1 parent a928eed commit b8e9289
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -14,7 +14,7 @@
/**
* @author Christopher Deckers
*/
class PatternTextEntryMask extends TextEntryMask {
public class PatternTextEntryMask extends TextEntryMask {

private enum CharType {
DIGIT,
Expand All @@ -29,12 +29,17 @@ private enum CharType {

private CharType[] charTypes;
private int[] chars;
private int defaultChar = '_';
private int defaultChar;

public PatternTextEntryMask(String pattern) {
this(pattern, '_');
}

public PatternTextEntryMask(String pattern, int defaultChar) {
if(pattern == null || pattern.length() == 0) {
throw new IllegalArgumentException("The mask cannot be empty!");
}
this.defaultChar = defaultChar;
List<CharType> charTypeList = new ArrayList<CharType>();
List<Integer> charList = new ArrayList<Integer>();
boolean isLastQuote = false;
Expand Down

0 comments on commit b8e9289

Please sign in to comment.