| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | CaseMapImpl.StringContextIterator
Implementation of UCaseProps.ContextIterator, iterates over a String. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final char | |
| private static final Trie2_16 | |
| private static final int | |
| public static final int | OMIT_UNCHANGED_TEXT
Omit unchanged text when case-mapping with Edits. |
| public static final int | |
| private static final int | TITLECASE_ADJUSTMENT_MASK
Bit mask for the titlecasing index adjustment options bit set. |
| private static final int | TITLECASE_ITERATOR_MASK
Bit mask for the titlecasing iterator options bit field. |
| public static final int | |
| public static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static int | |
| public static int | |
| private static int | |
| private static void | appendResult(int result, Appendable dest, int cpLength, int options, Edits edits)
Appends a full case mapping result, see |
| private static final void | |
| private static String | |
| public static String | |
| public static <A extends Appendable> A | |
| public static BreakIterator | |
| public static BreakIterator | |
| private static void | internalToLower(int caseLocale, int options, CharSequence src, int srcStart, int srcLimit, CaseMapImpl.
caseLocale >= 0: Lowercases [srcStart..srcLimit[ but takes context [0..srcLength[ into account. |
| private static void | |
| private static boolean | |
| private static <A extends Appendable> int | Returns: the src index after the titlecased sequence, or the start index if no Dutch IJInput: c is a letter I with or without acute accent. |
| public static String | |
| public static <A extends Appendable> A | |
| public static String | |
| public static <A extends Appendable> A | toTitle(int caseLocale, int options, BreakIterator titleIter, CharSequence src, A dest, Edits edits)
|
| public static String | |
| public static <A extends Appendable> A |
| ACUTE | back to summary |
|---|---|
| private static final char ACUTE | |
| CASE_TRIE | back to summary |
|---|---|
| private static final Trie2_16 CASE_TRIE | |
| LNS | back to summary |
|---|---|
| private static final int LNS | |
| OMIT_UNCHANGED_TEXT | back to summary |
|---|---|
| public static final int OMIT_UNCHANGED_TEXT Omit unchanged text when case-mapping with Edits. | |
| TITLECASE_ADJUST_TO_CASED | back to summary |
|---|---|
| public static final int TITLECASE_ADJUST_TO_CASED | |
| TITLECASE_ADJUSTMENT_MASK | back to summary |
|---|---|
| private static final int TITLECASE_ADJUSTMENT_MASK Bit mask for the titlecasing index adjustment options bit set. Currently two bits are defined: TITLECASE_NO_BREAK_ADJUSTMENT, TITLECASE_ADJUST_TO_CASED. See stringoptions.h.
| |
| TITLECASE_ITERATOR_MASK | back to summary |
|---|---|
| private static final int TITLECASE_ITERATOR_MASK Bit mask for the titlecasing iterator options bit field. Currently only 3 out of 8 values are used: 0 (words), TITLECASE_WHOLE_STRING, TITLECASE_SENTENCES. See stringoptions.h.
| |
| TITLECASE_SENTENCES | back to summary |
|---|---|
| public static final int TITLECASE_SENTENCES | |
| TITLECASE_WHOLE_STRING | back to summary |
|---|---|
| public static final int TITLECASE_WHOLE_STRING | |
| U_GC_M_MASK | back to summary |
|---|---|
| private static final int U_GC_M_MASK | |
| CaseMapImpl | back to summary |
|---|---|
| public CaseMapImpl() | |
| addTitleAdjustmentOption | back to summary |
|---|---|
| public static int addTitleAdjustmentOption(int options, int newOption) | |
| addTitleIteratorOption | back to summary |
|---|---|
| public static int addTitleIteratorOption(int options, int newOption) | |
| appendCodePoint | back to summary |
|---|---|
| private static int appendCodePoint(Appendable a, int c) throws IOException | |
| appendResult | back to summary |
|---|---|
| private static void appendResult(int result, Appendable dest, int cpLength, int options, Edits edits) throws IOException Appends a full case mapping result, see | |
| appendUnchanged | back to summary |
|---|---|
| private static final void appendUnchanged(CharSequence src, int start, int length, Appendable dest, int options, Edits edits) throws IOException | |
| applyEdits | back to summary |
|---|---|
| private static String applyEdits(CharSequence src, StringBuilder replacementChars, Edits edits) | |
| fold | back to summary |
|---|---|
| public static String fold(int options, CharSequence src) | |
| fold | back to summary |
|---|---|
| public static <A extends Appendable> A fold(int options, CharSequence src, A dest, Edits edits) | |
| getTitleBreakIterator | back to summary |
|---|---|
| public static BreakIterator getTitleBreakIterator(Locale locale, int options, BreakIterator iter) | |
| getTitleBreakIterator | back to summary |
|---|---|
| public static BreakIterator getTitleBreakIterator(ULocale locale, int options, BreakIterator iter) | |
| internalToLower | back to summary |
|---|---|
| private static void internalToLower(int caseLocale, int options, CharSequence src, int srcStart, int srcLimit, CaseMapImpl. caseLocale >= 0: Lowercases [srcStart..srcLimit[ but takes context [0..srcLength[ into account. caseLocale < 0: Case-folds [srcStart..srcLimit[. | |
| internalToUpper | back to summary |
|---|---|
| private static void internalToUpper(int caseLocale, int options, CharSequence src, Appendable dest, Edits edits) throws IOException | |
| isLNS | back to summary |
|---|---|
| private static boolean isLNS(int c) | |
| maybeTitleDutchIJ | back to summary |
|---|---|
| private static <A extends Appendable> int maybeTitleDutchIJ(CharSequence src, int c, int start, int segmentLimit, A dest, int options, Edits edits) throws IOException Input: c is a letter I with or without acute accent. start is the index in src after c, and is less than segmentLimit. If a plain i/I is followed by a plain j/J, or an i/I with acute (precomposed or decomposed) is followed by a j/J with acute, then we output accordingly.
| |
| toLower | back to summary |
|---|---|
| public static String toLower(int caseLocale, int options, CharSequence src) | |
| toLower | back to summary |
|---|---|
| public static <A extends Appendable> A toLower(int caseLocale, int options, CharSequence src, A dest, Edits edits) | |
| toTitle | back to summary |
|---|---|
| public static String toTitle(int caseLocale, int options, BreakIterator iter, CharSequence src) | |
| toTitle | back to summary |
|---|---|
| public static <A extends Appendable> A toTitle(int caseLocale, int options, BreakIterator titleIter, CharSequence src, A dest, Edits edits) | |
| toUpper | back to summary |
|---|---|
| public static String toUpper(int caseLocale, int options, CharSequence src) | |
| toUpper | back to summary |
|---|---|
| public static <A extends Appendable> A toUpper(int caseLocale, int options, CharSequence src, A dest, Edits edits) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final char[] | |
| private static final char[] | |
| private static final char | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static final int | getDiacriticData(int c)
Returns a non-zero value for each of the Greek combining diacritics listed in The Unicode Standard, version 8, chapter 7.2 Greek, plus some perispomeni look-alikes. |
| private static final int | |
| private static boolean | |
| private static <A extends Appendable> A | toUpper(int options, CharSequence src, A dest, Edits edits)
Greek string uppercasing with a state machine. |
| AFTER_CASED | back to summary |
|---|---|
| private static final int AFTER_CASED | |
| AFTER_VOWEL_WITH_COMBINING_ACCENT | back to summary |
|---|---|
| private static final int AFTER_VOWEL_WITH_COMBINING_ACCENT | |
| AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | back to summary |
|---|---|
| private static final int AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | |
| data0370 | back to summary |
|---|---|
| private static final char[] data0370 | |
| data1F00 | back to summary |
|---|---|
| private static final char[] data1F00 | |
| data2126 | back to summary |
|---|---|
| private static final char data2126 | |
| HAS_ACCENT | back to summary |
|---|---|
| private static final int HAS_ACCENT | |
| HAS_COMBINING_DIALYTIKA | back to summary |
|---|---|
| private static final int HAS_COMBINING_DIALYTIKA | |
| HAS_DIALYTIKA | back to summary |
|---|---|
| private static final int HAS_DIALYTIKA | |
| HAS_EITHER_DIALYTIKA | back to summary |
|---|---|
| private static final int HAS_EITHER_DIALYTIKA | |
| HAS_OTHER_GREEK_DIACRITIC | back to summary |
|---|---|
| private static final int HAS_OTHER_GREEK_DIACRITIC | |
| HAS_VOWEL | back to summary |
|---|---|
| private static final int HAS_VOWEL | |
| HAS_VOWEL_AND_ACCENT | back to summary |
|---|---|
| private static final int HAS_VOWEL_AND_ACCENT | |
| HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA | back to summary |
|---|---|
| private static final int HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA | |
| HAS_YPOGEGRAMMENI | back to summary |
|---|---|
| private static final int HAS_YPOGEGRAMMENI | |
| UPPER_MASK | back to summary |
|---|---|
| private static final int UPPER_MASK | |
| GreekUpper | back to summary |
|---|---|
| private GreekUpper() | |
| getDiacriticData | back to summary |
|---|---|
| private static final int getDiacriticData(int c) Returns a non-zero value for each of the Greek combining diacritics listed in The Unicode Standard, version 8, chapter 7.2 Greek, plus some perispomeni look-alikes. | |
| getLetterData | back to summary |
|---|---|
| private static final int getLetterData(int c) | |
| isFollowedByCasedLetter | back to summary |
|---|---|
| private static boolean isFollowedByCasedLetter(CharSequence s, int i) | |
| toUpper | back to summary |
|---|---|
| private static <A extends Appendable> A toUpper(int options, CharSequence src, A dest, Edits edits) throws IOException Greek string uppercasing with a state machine. Probably simpler than a stateless function that has to figure out complex context-before for each character. Todo Try to re-consolidate one way or another with the non-Greek function. Keep this consistent with the C++ versions in ustrcase.cpp (UTF-16) and ucasemap.cpp (UTF-8). | |
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected int | |
| protected int | |
| protected int | |
| protected int | |
| protected CharSequence |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StringContextIterator(CharSequence
String to iterate over. src, int Start index of the current code point. cpStart, int Limit index of the current code point. cpLimit)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public int | |
| public void | |
| public void | |
| public int | next()
Implements com. |
| public int | Returns: The next code point to be case-mapped, or <0 when the iteration is done.Iterate forward through the string to fetch the next code point to be case-mapped, and set the context indexes for it. |
| public void | reset(int
>0: Begin iterating forward from the first code point
after the one that is being case-mapped.
<0: Begin iterating backward from the first code point
before the one that is being case-mapped. direction)Implements com. |
| public void | |
| public void | setLimit(int
The iteration limit. lim)Set the iteration limit for nextCaseMapCP() to an index within the string. |
| cpLimit | back to summary |
|---|---|
| protected int cpLimit | |
| cpStart | back to summary |
|---|---|
| protected int cpStart | |
| dir | back to summary |
|---|---|
| protected int dir | |
| index | back to summary |
|---|---|
| protected int index | |
| limit | back to summary |
|---|---|
| protected int limit | |
| s | back to summary |
|---|---|
| protected CharSequence s | |
| StringContextIterator | back to summary |
|---|---|
| public StringContextIterator(CharSequence src) Constructor.
| |
| StringContextIterator | back to summary |
|---|---|
| public StringContextIterator(CharSequence src, int cpStart, int cpLimit) Constructor.
| |
| getCPLength | back to summary |
|---|---|
| public int getCPLength() | |
| getCPLimit | back to summary |
|---|---|
| public int getCPLimit() Returns the limit of the code point that was last returned by nextCaseMapCP(). | |
| getCPStart | back to summary |
|---|---|
| public int getCPStart() Returns the start of the code point that was last returned by nextCaseMapCP(). | |
| moveTo | back to summary |
|---|---|
| public void moveTo(int i) | |
| moveToLimit | back to summary |
|---|---|
| public void moveToLimit() Move to the iteration limit without fetching code points up to there. | |
| next | back to summary |
|---|---|
| public int next() Implements com. Doc from com. Iterate and return the next code point, moving in the direction determined by the reset() call.
| |
| nextCaseMapCP | back to summary |
|---|---|
| public int nextCaseMapCP() Iterate forward through the string to fetch the next code point to be case-mapped, and set the context indexes for it. When the iteration limit is reached (and -1 is returned), getCPStart() will be at the iteration limit. Iteration with next() does not affect the position for nextCaseMapCP().
| |
| reset | back to summary |
|---|---|
| public void reset(int direction) Implements com. Doc from com. Reset the iterator for forward or backward iteration.
| |
| setCPStartAndLimit | back to summary |
|---|---|
| public void setCPStartAndLimit(int s, int l) | |
| setLimit | back to summary |
|---|---|
| public void setLimit(int lim) Set the iteration limit for nextCaseMapCP() to an index within the string. If the limit parameter is negative or past the string, then the string length is restored as the iteration limit. This limit does not affect the next() function which always iterates to the very end of the string.
| |
| Modifier and Type | Field and Description |
|---|---|
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | current()
Implements abstract com. |
| public int | first()
Implements abstract com. |
| public int | following(int
The character position to start searching from. offset)Implements abstract com. |
| public CharacterIterator | getText()
Implements abstract com. |
| public int | last()
Implements abstract com. |
| public int | next(int
The number of boundaries to advance over (if positive, moves
forward; if negative, moves backwards). n)Implements abstract com. |
| public int | next()
Implements abstract com. |
| private static void | |
| public int | previous()
Implements abstract com. |
| public void | setText(CharacterIterator
A CharacterIterator referring to the text
to analyze with this BreakIterator (the iterator's current
position is ignored, but its other state is significant). newText)Implements abstract com. |
| public void | setText(CharSequence
A CharSequence containing the text to analyze with
this BreakIterator. newText)Overrides com. |
| public void | setText(String
A String containing the text to analyze with
this BreakIterator. newText)Overrides com. |
| length | back to summary |
|---|---|
| private int length | |
| WholeStringBreakIterator | back to summary |
|---|---|
| private WholeStringBreakIterator() | |
| current | back to summary |
|---|---|
| public int current() Implements abstract com. Doc from com. Return the iterator's current position.
| |
| first | back to summary |
|---|---|
| public int first() Implements abstract com. Doc from com. Set the iterator to the first boundary position. This is always the beginning index of the text this iterator iterates over. For example, if the iterator iterates over a whole string, this function will always return 0.
| |
| following | back to summary |
|---|---|
| public int following(int offset) Implements abstract com. Doc from com. Sets the iterator's current iteration position to be the first boundary position following the specified position. (Whether the specified position is itself a boundary position or not doesn't matter-- this function always moves the iteration position to the first boundary after the specified position.) If the specified position is the past-the-end position, returns DONE.
| |
| getText | back to summary |
|---|---|
| public CharacterIterator getText() Implements abstract com. Doc from com. Returns a CharacterIterator over the text being analyzed. Caution The state of the returned CharacterIterator must not be modified in any way while the BreakIterator is still in use. Doing so will lead to undefined behavior of the BreakIterator. Clone the returned CharacterIterator first and work with that. The returned CharacterIterator is a reference to the actual iterator being used by the BreakIterator. No guarantees are made about the current position of this iterator when it is returned; it may differ from the BreakIterators current position. If you need to move that position to examine the text, clone this function's return value first.
| |
| last | back to summary |
|---|---|
| public int last() Implements abstract com. Doc from com. Set the iterator to the last boundary position. This is always the "past-the-end" index of the text this iterator iterates over. For example, if the iterator iterates over a whole string (call it "text"), this function will always return text.length().
| |
| next | back to summary |
|---|---|
| public int next(int n) Implements abstract com. Doc from com. Move the iterator by the specified number of steps in the text. A positive number moves the iterator forward; a negative number moves the iterator backwards. If this causes the iterator to move off either end of the text, this function returns DONE; otherwise, this function returns the position of the appropriate boundary. Calling this function is equivalent to calling next() or previous() n times.
| |
| next | back to summary |
|---|---|
| public int next() Implements abstract com. Doc from com. Advances the iterator forward one boundary. The current iteration position is updated to point to the next boundary position after the current position, and this is also the value that is returned. If the current position is equal to the value returned by last(), or to DONE, this function returns DONE and sets the current position to DONE.
| |
| notImplemented | back to summary |
|---|---|
| private static void notImplemented() | |
| previous | back to summary |
|---|---|
| public int previous() Implements abstract com. Doc from com. Move the iterator backward one boundary. The current iteration position is updated to point to the last boundary position before the current position, and this is also the value that is returned. If the current position is equal to the value returned by first(), or to DONE, this function returns DONE and sets the current position to DONE.
| |
| setText | back to summary |
|---|---|
| public void setText(CharacterIterator newText) Implements abstract com. Doc from com. Sets the iterator to analyze a new piece of text. This function resets the current iteration position to the beginning of the text. (The old iterator is dropped.) Caution The supplied CharacterIterator is used directly by the BreakIterator, and must not be altered in any way by code outside of the BreakIterator. Doing so will lead to undefined behavior of the BreakIterator.
| |
| setText | back to summary |
|---|---|
| public void setText(CharSequence newText) Overrides com. Doc from com. Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a CharSequence, and the current iteration position is reset to the beginning of the text. (The old text is dropped.) The text underlying the CharSequence must not be be modified while the BreakIterator holds a references to it. (As could possibly occur with a StringBuilder, for example).
| |
| setText | back to summary |
|---|---|
| public void setText(String newText) Overrides com. Doc from com. Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a String, and the current iteration position is reset to the beginning of the string. (The old text is dropped.) | |