@Override void getUnicodeSetImpl( UnicodeSet setFillIn, int which){ setFillIn.add(0,0x7f); } }
@Override void getUnicodeSetImpl( UnicodeSet setFillIn, int which){ setFillIn.add(0,0xff); } }
static void getCompleteUnicodeSet(UnicodeSet setFillIn){ setFillIn.add(0, 0x10ffff); } }
@Override void getUnicodeSetImpl( UnicodeSet setFillIn, int which){ for (int i = 1; i < NUM_OF_CONVERTERS; i++) { myConverterArray[i].MBCSGetFilteredUnicodeSetForUnicode(myConverterArray[i].sharedData, setFillIn, which, CharsetMBCS.UCNV_SET_FILTER_NONE); } setFillIn.add(0x0000); setFillIn.add(0x0009); setFillIn.add(0x000A); setFillIn.add(0x0020, 0x007F); setFillIn.add(0x00A0, 0x00FF); } }
private static final void addCaseMapping(UnicodeSet set, int result, StringBuilder full) { if(result >= 0) { if(result > UCaseProps.MAX_STRING_LENGTH) { // add a single-code point case mapping set.add(result); } else { // add a string case mapping from full with length result set.add(full.toString()); full.setLength(0); } } // result < 0: the code point mapped to itself, no need to add it // see UCaseProps }
/** * @see #addAll(com.ibm.icu.text.UnicodeSet) * @stable ICU 4.4 */ @SuppressWarnings("unchecked") // See ticket #11395, this is safe. public <T extends CharSequence> UnicodeSet addAll(T... collection) { checkFrozen(); for (T str : collection) { add(str); } return this; }
@Override void getUnicodeSetImpl( UnicodeSet setFillIn, int which){ setFillIn.add(0,0x7f); // CharsetMBCS mbcshz = (CharsetMBCS)CharsetICU.forNameICU("icu-internal-25546"); gbCharset.MBCSGetFilteredUnicodeSetForUnicode(gbCharset.sharedData, setFillIn, which, CharsetMBCS.UCNV_SET_FILTER_HZ); } }
public void upropsvec_addPropertyStarts(UnicodeSet set) { /* add the start code point of each same-value range of the properties vectors trie */ if(m_additionalColumnsCount_>0) { /* if m_additionalColumnsCount_==0 then the properties vectors trie may not be there at all */ Iterator<Trie2.Range> trieIterator = m_additionalTrie_.iterator(); Trie2.Range range; while(trieIterator.hasNext() && !(range=trieIterator.next()).leadSurrogate) { set.add(range.startCodePoint); } } }
/** * Makes a set from a multicharacter string. Thus "ch" => {"ch"} * <br><b>Warning: you cannot add an empty string ("") to a UnicodeSet.</b> * @param s the source string * @return a newly created set containing the given string * @stable ICU 2.0 */ public static UnicodeSet from(CharSequence s) { return new UnicodeSet().add(s); }
void addExpansions(int start, int end) { if (unreversedPrefix.length() == 0 && suffix == null) { if (expansions != null) { expansions.add(start, end); } } else { addStrings(start, end, expansions); } }
public final void addPropertyStarts(UnicodeSet set) { /* add the start code point of each same-value range of the trie */ Iterator<Trie2.Range> trieIterator=trie.iterator(); Trie2.Range range; while(trieIterator.hasNext() && !(range=trieIterator.next()).leadSurrogate) { set.add(range.startCodePoint); } /* add code points with hardcoded properties, plus the ones following them */ /* (none right now, see comment below) */ /* * Omit code points with hardcoded specialcasing properties * because we do not build property UnicodeSets for them right now. */ }
private UnicodeSet add_unchecked(int start, int end) { if (start < MIN_VALUE || start > MAX_VALUE) { throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6)); } if (end < MIN_VALUE || end > MAX_VALUE) { throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(end, 6)); } if (start < end) { add(range(start, end), 2, 0); } else if (start == end) { add(start); } return this; }
public void addCanonIterPropertyStarts(UnicodeSet set) { /* add the start code point of each same-value range of the canonical iterator data trie */ ensureCanonIterData(); // currently only used for the SEGMENT_STARTER property Iterator<Trie2.Range> trieIterator=canonIterData.iterator(segmentStarterMapper); Trie2.Range range; while(trieIterator.hasNext() && !(range=trieIterator.next()).leadSurrogate) { /* add the start code point to the USet */ set.add(range.startCodePoint); } } private static final Trie2.ValueMapper segmentStarterMapper=new Trie2.ValueMapper() {
private void enumLcccRange(int start, int end, int norm16, UnicodeSet set) { if(isAlgorithmicNoNo(norm16)) { // Range of code points with same-norm16-value algorithmic decompositions. // They might have different non-zero FCD16 values. do { int fcd16=getFCD16(start); if(fcd16>0xff) { set.add(start); } } while(++start<=end); } else { int fcd16=getFCD16(start); if(fcd16>0xff) { set.add(start, end); } } }
void copyRangeCE32(int start, int end, int ce32) { ce32 = copyCE32(ce32); dest.trie.setRange(start, end, ce32, true); if(CollationDataBuilder.isBuilderContextCE32(ce32)) { dest.contextChars.add(start, end); } }
private void addPrefix(CollationData d, CharSequence pfx, int c, int ce32) { setPrefix(pfx); ce32 = d.getFinalCE32(ce32); if (Collation.isContractionCE32(ce32)) { int idx = Collation.indexFromCE32(ce32); addContractions(c, d.contexts, idx + 2); } tailored.add(new StringBuilder(unreversedPrefix.appendCodePoint(c))); resetPrefix(); }
/** * Adds a starting or ending string character to the spanNotSet * so that a character span ends before any string. */ private void addToSpanNotSet(int c) { if (Utility.sameObjects(spanNotSet, null) || Utility.sameObjects(spanNotSet, spanSet)) { if (spanSet.contains(c)) { return; // Nothing to do. } spanNotSet = spanSet.cloneAsThawed(); } spanNotSet.add(c); }