package jp.sourceforge.nicoro;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class MatcherThreadLocal extends ThreadLocal<Matcher> {
    private final String mPattern;
    
    public MatcherThreadLocal(String pattern) {
        mPattern = pattern;
    }
    
    @Override
    protected Matcher initialValue() {
        return Pattern.compile(mPattern).matcher("");
    }
}
