| java.lang.Object com.ibm.icu.text.ReplaceableContextIterator
ReplaceableContextIterator | class ReplaceableContextIterator implements UCaseProps.ContextIterator(Code) | | Implementation of UCaseProps.ContextIterator, iterates over a Replaceable.
See casetrn.cpp/utrans_rep_caseContextIterator().
See also UCharacter.StringContextIterator.
|
Method Summary | |
public boolean | didReachLimit() | public int | getCaseMapCPStart() Get the index of where the code point currently being case-mapped starts. | public int | next() | 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. | public int | replace(String text) Replace the current code point by its case mapping,
and update the indexes.
Parameters: text - Replacement text. | public void | reset(int dir) | public void | setContextLimits(int contextStart, int contextLimit) Set the start and limit indexes for context iteration with next(). | public void | setIndex(int index) Set the index where nextCaseMapCP() is to start iterating. | public void | setLimit(int lim) Set the iteration limit for nextCaseMapCP() to an index within the string. | public void | setText(Replaceable rep) Set the text for iteration. |
indexlimitcpStartcpLimitcontextStartcontextLimit | protected int indexlimitcpStartcpLimitcontextStartcontextLimit(Code) | | |
reachedLimit | protected boolean reachedLimit(Code) | | |
ReplaceableContextIterator | ReplaceableContextIterator()(Code) | | Constructor.
Parameters: rep - Replaceable to iterate over. |
didReachLimit | public boolean didReachLimit()(Code) | | Did forward context iteration with next() reach the iteration limit?
Boolean value. |
getCaseMapCPStart | public int getCaseMapCPStart()(Code) | | Get the index of where the code point currently being case-mapped starts.
The start index of the current code point. |
nextCaseMapCP | public int nextCaseMapCP()(Code) | | Iterate forward through the string to fetch the next code point
to be case-mapped, and set the context indexes for it.
The next code point to be case-mapped, or <0 when the iteration is done. |
replace | public int replace(String text)(Code) | | Replace the current code point by its case mapping,
and update the indexes.
Parameters: text - Replacement text. The delta for the change of the text length. |
reset | public void reset(int dir)(Code) | | |
setContextLimits | public void setContextLimits(int contextStart, int contextLimit)(Code) | | Set the start and limit indexes for context iteration with next().
Parameters: contextStart - Start of context for next(). Parameters: contextLimit - Limit of context for next(). |
setIndex | public void setIndex(int index)(Code) | | Set the index where nextCaseMapCP() is to start iterating.
Parameters: index - Iteration start index for nextCaseMapCP(). |
setLimit | public void setLimit(int lim)(Code) | | 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.
Parameters: lim - The iteration limit. |
setText | public void setText(Replaceable rep)(Code) | | Set the text for iteration.
Parameters: rep - Iteration text. |
|
|