this.caselessMatchPartitionSize = caselessMatchPartitionSize;
this.maximumCodePoint = maximumCodePoint;
for (int n = 0 ; n < propertyValues.length ; ++n) {
String propertyValue = propertyValues[n];
String propertyIntervals = intervals[n];
IntCharSet set = new IntCharSet();
for (int index = 0 ; index < propertyIntervals.length() ; ) {
int start = propertyIntervals.codePointAt(index);
index += (start <= 0xFFFF ? 1 : 2);
int end = propertyIntervals.codePointAt(index);
index += (end <= 0xFFFF ? 1 : 2);
//TODO: Remove BMP boundary condition
if (start <= 0xFFFF) {
//TODO: Change the character type from char to int and remove boundary condition
set.add(new Interval((char)start, (char)Math.min(end, 0xFFFF)));
}
}
propertyValueIntervals.put(propertyValue, set);
if (2 == propertyValue.length()) {
String singleLetter = propertyValue.substring(0, 1);
IntCharSet singleLetterPropValueSet
= propertyValueIntervals.get(singleLetter);
if (null == singleLetterPropValueSet) {
singleLetterPropValueSet = new IntCharSet();
propertyValueIntervals.put(singleLetter, singleLetterPropValueSet);
}
singleLetterPropValueSet.add(set);
}
}
for (int n = 0 ; n < propertyValueAliases.length ; n += 2) {
String alias = propertyValueAliases[n];
String propertyValue = propertyValueAliases[n + 1];
IntCharSet targetSet = propertyValueIntervals.get(propertyValue);
if (null != targetSet) {
propertyValueIntervals.put(alias, targetSet);
}
}
bindInvariantIntervals();