if (localeStarted) localeBuilder.append("_");
localeStarted = true;
localeBuilder.append(pieces[i]);
} else if (isCaseShortcut(pieces[i])){
if (caseSet) {
throw new InvalidCollationSchemeException(scheme, "can't set the case sensitivity twice");
}
caseSensitive = CASE_SENSITIVE.equalsIgnoreCase(pieces[i]);
localeFinished = true;
caseSet = true;
} else {
if (accentSet) {
throw new InvalidCollationSchemeException(scheme, "can't set the accent sensitivity twice");
}
accentSensitive = ACCENT_SENSITIVE.equalsIgnoreCase(pieces[i]);
localeFinished = true;
accentSet = true;
}
}
else if (localeFinished) {
throw new InvalidCollationSchemeException(scheme, "can't define locale after keywords or shortcuts");
} else {
if (localeStarted) localeBuilder.append("_");
localeStarted = true;
localeBuilder.append(pieces[i]);
}