/** * Returns <code>true</code> if the argument is a composing character * and <code>false</code> otherwise. * * @param c a Unicode code point * @return <code>true</code> if the argument is a composing character * <code>false</code> otherwise */ private static boolean isComposingChar(int c) { return COMPOSING_CHARACTERS.contains(c); }
/** * Returns <code>true</code> if the argument is a composing character * and <code>false</code> otherwise. * * @param c a Unicode code point * @return <code>true</code> if the argument is a composing character * <code>false</code> otherwise */ private static boolean isComposingChar(int c) { return COMPOSING_CHARACTERS.contains(c); }
/** * Returns <code>true</code> if the argument is a composing character * and <code>false</code> otherwise. * * @param c a Unicode code point * @return <code>true</code> if the argument is a composing character * <code>false</code> otherwise */ private static boolean isComposingChar(int c) { return COMPOSING_CHARACTERS.contains(c); }
/** * Returns <code>true</code> if the argument is a composing character * and <code>false</code> otherwise. * * @param c a Unicode code point * @return <code>true</code> if the argument is a composing character * <code>false</code> otherwise */ private static boolean isComposingChar(int c) { return COMPOSING_CHARACTERS.contains(c); }
/** * @see #containsAll(com.ibm.icu.text.UnicodeSet) * @stable ICU 4.4 */ public <T extends CharSequence> boolean containsAll(Iterable<T> collection) { for (T o : collection) { if (!contains(o)) { return false; } } return true; }
/** * @see #containsNone(com.ibm.icu.text.UnicodeSet) * @stable ICU 4.4 */ public <T extends CharSequence> boolean containsNone(Iterable<T> collection) { for (T o : collection) { if (contains(o)) { return false; } } return true; }
public boolean handles(int c, int breakType) { return (breakType >= 0 && breakType < fHandled.length) && (fHandled[breakType].contains(c)); }
/** For fast UnicodeSet::contains(c). */ public boolean contains(int c) { return spanSet.contains(c); }
@Override public boolean handles(int c, int breakType) { return fTypes.get(breakType) && // this type can use us fSet.contains(c); // we recognize the character }
static int spanOneBack(final UnicodeSet set, CharSequence s, int length) { char c = s.charAt(length - 1); if (c >= 0xdc00 && c <= 0xdfff && length >= 2) { char c2 = s.charAt(length - 2); if (com.ibm.icu.text.UTF16.isLeadSurrogate(c2)) { int supplementary = Character.toCodePoint(c2, c); return set.contains(supplementary) ? 2 : -2; } } return set.contains(c) ? 1 : -1; }
/** * {@inheritDoc} * @stable ICU 4.4 */ @Override public boolean hasBoundaryBefore(int c) { return !set.contains(c) || norm2.hasBoundaryBefore(c); }
/** * {@inheritDoc} * @stable ICU 4.4 */ @Override public boolean isInert(int c) { return !set.contains(c) || norm2.isInert(c); }
/** * {@inheritDoc} * @stable ICU 4.6 */ @Override public String getDecomposition(int c) { return set.contains(c) ? norm2.getDecomposition(c) : null; }
/** * {@inheritDoc} * @stable ICU 4.4 */ @Override public boolean hasBoundaryAfter(int c) { return !set.contains(c) || norm2.hasBoundaryAfter(c); }
/** * {@inheritDoc} * @stable ICU 49 */ @Override public String getRawDecomposition(int c) { return set.contains(c) ? norm2.getRawDecomposition(c) : null; }
/** * {@inheritDoc} * @stable ICU 49 */ @Override public int getCombiningClass(int c) { return set.contains(c) ? norm2.getCombiningClass(c) : 0; }
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); } } } }
/** * 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); }