protected UnicodeSet set(int value) { UnicodeSet set = new UnicodeSet(); set.applyIntPropertyValue(propertyId, value); return set; }
protected UnicodeSet set() { UnicodeSet set = new UnicodeSet(); set.applyIntPropertyValue(propertyId, 1); // 1 = True return set; }
public synchronized void handleChar(int c, int breakType) { if (breakType >= 0 && breakType < fHandled.length && c != DONE32) { if (!fHandled[breakType].contains(c)) { int script = UCharacter.getIntPropertyValue(c, UProperty.SCRIPT); fHandled[breakType].applyIntPropertyValue(UProperty.SCRIPT, script); } } } }
private void addScriptChars(ULocale locale, UnicodeSet allowedChars) { int scripts[] = UScript.getCode(locale); if (scripts != null) { UnicodeSet tmpSet = new UnicodeSet(); for (int i = 0; i < scripts.length; i++) { tmpSet.applyIntPropertyValue(UProperty.SCRIPT, scripts[i]); allowedChars.addAll(tmpSet); } } // else it's an unknown script. // Maybe they asked for the script of "zxx", which refers to no linguistic content. // Maybe they asked for the script of a newer locale that we don't know in the older version of ICU. }
private static void addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges) { for (int propertyValue = UCharacter.getIntPropertyMinValue(property); propertyValue <= UCharacter.getIntPropertyMaxValue(property); propertyValue++) { UnicodeSet set = new UnicodeSet(); set.applyIntPropertyValue(property, propertyValue); String propertyName = namePrefix + UCharacter.getPropertyValueName(property, propertyValue, UProperty.NameChoice.SHORT); IntervalSet intervalSet = propertyCodePointRanges.get(propertyName); if (intervalSet == null) { intervalSet = new IntervalSet(); propertyCodePointRanges.put(propertyName, intervalSet); } addUnicodeSetToIntervalSet(set, intervalSet); } }
private static void addUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) { for (int property = UProperty.BINARY_START; property < UProperty.BINARY_LIMIT; property++) { String propertyName = getShortPropertyName(property); IntervalSet intervalSet = new IntervalSet(); UnicodeSet unicodeSet = new UnicodeSet(); unicodeSet.applyIntPropertyValue(property, 1); for (UnicodeSet.EntryRange range : unicodeSet.ranges()) { intervalSet.add(range.codepoint, range.codepointEnd); } propertyCodePointRanges.put(propertyName, intervalSet); } }
private static void addUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) { for (int property = UProperty.BINARY_START; property < UProperty.BINARY_LIMIT; property++) { String propertyName = getShortPropertyName(property); IntervalSet intervalSet = new IntervalSet(); UnicodeSet unicodeSet = new UnicodeSet(); unicodeSet.applyIntPropertyValue(property, 1); for (UnicodeSet.EntryRange range : unicodeSet.ranges()) { intervalSet.add(range.codepoint, range.codepointEnd); } propertyCodePointRanges.put(propertyName, intervalSet); } }
private static void addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges) { for (int propertyValue = UCharacter.getIntPropertyMinValue(property); propertyValue <= UCharacter.getIntPropertyMaxValue(property); propertyValue++) { UnicodeSet set = new UnicodeSet(); set.applyIntPropertyValue(property, propertyValue); String propertyName = namePrefix + UCharacter.getPropertyValueName(property, propertyValue, UProperty.NameChoice.SHORT); IntervalSet intervalSet = propertyCodePointRanges.get(propertyName); if (intervalSet == null) { intervalSet = new IntervalSet(); propertyCodePointRanges.put(propertyName, intervalSet); } addUnicodeSetToIntervalSet(set, intervalSet); } }
private static void addIntPropertyRanges(int property, String namePrefix, Map<String, IntervalSet> propertyCodePointRanges) { for (int propertyValue = UCharacter.getIntPropertyMinValue(property); propertyValue <= UCharacter.getIntPropertyMaxValue(property); propertyValue++) { UnicodeSet set = new UnicodeSet(); set.applyIntPropertyValue(property, propertyValue); String propertyName = namePrefix + UCharacter.getPropertyValueName(property, propertyValue, UProperty.NameChoice.SHORT); IntervalSet intervalSet = propertyCodePointRanges.get(propertyName); if (intervalSet == null) { intervalSet = new IntervalSet(); propertyCodePointRanges.put(propertyName, intervalSet); } addUnicodeSetToIntervalSet(set, intervalSet); } }
tempSet.applyIntPropertyValue(UProperty.SCRIPT, UScript.COMMON); fAllowedCharsSet.addAll(tempSet); tempSet.applyIntPropertyValue(UProperty.SCRIPT, UScript.INHERITED); fAllowedCharsSet.addAll(tempSet);
@SuppressWarnings("deprecation") private static void addUnicodeBinaryPropertyCodesToCodePointRanges(Map<String, IntervalSet> propertyCodePointRanges) { for (int property = UProperty.BINARY_START; property < UProperty.BINARY_LIMIT; property++) { String propertyName = getShortPropertyName(property); IntervalSet intervalSet = new IntervalSet(); UnicodeSet unicodeSet = new UnicodeSet(); unicodeSet.applyIntPropertyValue(property, 1); for (UnicodeSet.EntryRange range : unicodeSet.ranges()) { intervalSet.add(range.codepoint, range.codepointEnd); } propertyCodePointRanges.put(propertyName, intervalSet); } }
applyIntPropertyValue(p, v); if(invert) { complement();