TreeSet<Accept> acceptTree = getAcceptTree();
Scanner acceptLanguageScanner = new Scanner(headerValue).useDelimiter(",\\s?");
while (acceptLanguageScanner.hasNext()) {
if (acceptLanguageScanner.hasNext(REG_EX_ACCEPT_LANGUAGES_WITH_Q_FACTOR)) {
acceptLanguageScanner.next(REG_EX_ACCEPT_LANGUAGES_WITH_Q_FACTOR);
MatchResult result = acceptLanguageScanner.match();
if (result.groupCount() == 2) {
String languagerange = result.group(1);
double qualityFactor = result.group(2) != null ? Double.parseDouble(result.group(2)) : 1d;
acceptTree.add(new Accept().setQuality(qualityFactor).setValue(languagerange));
} else {