class PatternStringTokenizer implements StringTokenizer {

    @Override
    public List<String> tokenize(String line)
    {
        Matcher matcher = myPattern.matcher(line);
        if (matcher.matches())
        {
            List<String> cells = new ArrayList<>(matcher.groupCount());
            for (int index = 1; index <= matcher.groupCount(); ++index)
            {
                cells.add(matcher.group(index));
            }
            return cells;
        }
        String[] cells = new String[matcher.groupCount()];
        Arrays.fill(cells, StringUtilities.EMPTY);
        return Arrays.asList(cells);
    }

    public  PatternStringTokenizer(Pattern pattern);
    public  PatternStringTokenizer(String pattern);

}