Top Description Inners Fields Constructors Methods
com.ibm.icu.impl.coll

public final Class FCDIterCollationIterator

extends IterCollationIterator
Class Inheritance
Imports
com.ibm.icu.impl.Normalizer2Impl, com.ibm.icu.text.UCharacterIterator

Incrementally checks the input text for FCD and normalizes where necessary.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private int
private final Normalizer2Impl
private StringBuilder
private int
private StringBuilder
s

private int
private FCDIterCollationIterator.State
Inherited from com.ibm.icu.impl.coll.IterCollationIterator:
iter

Constructor Summary

AccessConstructor and Description
public
FCDIterCollationIterator(CollationData data, boolean numeric, UCharacterIterator ui, int startIndex)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
public int
protected char
handleGetTrailSurrogate()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.handleGetTrailSurrogate.

Called when handleNextCE32() returns a LEAD_SURROGATE_TAG for a lead surrogate code unit.
protected long
handleNextCE32()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.handleNextCE32.

Returns the next code point and its local CE32 value.
public int
nextCodePoint()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.nextCodePoint.

Returns the next code point (with post-increment).
private boolean

Returns:

true if success
nextSegment
()

Extends the FCD text segment forward or normalizes around pos.

private void
public int
previousCodePoint()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.previousCodePoint.

Returns the previous code point (with pre-decrement).
private boolean

Returns:

true if success
previousSegment
()

Extends the FCD text segment backward or normalizes around pos.

public void
resetToOffset(int newOffset)

Overrides com.ibm.icu.impl.coll.IterCollationIterator.resetToOffset.

Resets the iterator state and sets the position to the specified offset.
private void
switchToBackward()

Switches to backward checking.

private void
switchToForward()

Switches to forward checking if possible.

Field Detail

limitback to summary
private int limit
nfcImplback to summary
private final Normalizer2Impl nfcImpl
normalizedback to summary
private StringBuilder normalized
posback to summary
private int pos
sback to summary
private StringBuilder s
startback to summary
private int start
stateback to summary
private FCDIterCollationIterator.State state

Constructor Detail

FCDIterCollationIteratorback to summary
public FCDIterCollationIterator(CollationData data, boolean numeric, UCharacterIterator ui, int startIndex)

Method Detail

backwardNumCodePointsback to summary
protected void backwardNumCodePoints(int num)

Overrides com.ibm.icu.impl.coll.IterCollationIterator.backwardNumCodePoints.

Annotations
@Override
forwardNumCodePointsback to summary
protected void forwardNumCodePoints(int num)

Overrides com.ibm.icu.impl.coll.IterCollationIterator.forwardNumCodePoints.

Annotations
@Override
getOffsetback to summary
public int getOffset()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.getOffset.

Annotations
@Override
handleGetTrailSurrogateback to summary
protected char handleGetTrailSurrogate()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.handleGetTrailSurrogate.

Doc from com.ibm.icu.impl.coll.CollationIterator.handleGetTrailSurrogate.

Called when handleNextCE32() returns a LEAD_SURROGATE_TAG for a lead surrogate code unit. Returns the trail surrogate in that case and advances past it, if a trail surrogate follows the lead surrogate. Otherwise returns any other code unit and does not advance.

Annotations
@Override
handleNextCE32back to summary
protected long handleNextCE32()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.handleNextCE32.

Doc from com.ibm.icu.impl.coll.CollationIterator.handleNextCE32.

Returns the next code point and its local CE32 value. Returns Collation.FALLBACK_CE32 at the end of the text (c<0) or when c's CE32 value is to be looked up in the base data (fallback). The code point is used for fallbacks, context and implicit weights. It is ignored when the returned CE32 is not special (e.g., FFFD_CE32). Returns the code point in bits 63..32 (signed) and the CE32 in bits 31..0.

Annotations
@Override
nextCodePointback to summary
public int nextCodePoint()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.nextCodePoint.

Doc from com.ibm.icu.impl.coll.CollationIterator.nextCodePoint.

Returns the next code point (with post-increment). Public for identical-level comparison and for testing.

Annotations
@Override
nextSegmentback to summary
private boolean nextSegment()

Extends the FCD text segment forward or normalizes around pos.

Returns:boolean

true if success

normalizeback to summary
private void normalize(CharSequence s)
previousCodePointback to summary
public int previousCodePoint()

Overrides com.ibm.icu.impl.coll.IterCollationIterator.previousCodePoint.

Doc from com.ibm.icu.impl.coll.CollationIterator.previousCodePoint.

Returns the previous code point (with pre-decrement). Public for identical-level comparison and for testing.

Annotations
@Override
previousSegmentback to summary
private boolean previousSegment()

Extends the FCD text segment backward or normalizes around pos.

Returns:boolean

true if success

resetToOffsetback to summary
public void resetToOffset(int newOffset)

Overrides com.ibm.icu.impl.coll.IterCollationIterator.resetToOffset.

Doc from com.ibm.icu.impl.coll.CollationIterator.resetToOffset.

Resets the iterator state and sets the position to the specified offset. Subclasses must implement, and must call the parent class method, or CollationIterator.reset().

Annotations
@Override
switchToBackwardback to summary
private void switchToBackward()

Switches to backward checking.

switchToForwardback to summary
private void switchToForward()

Switches to forward checking if possible.

com.ibm.icu.impl.coll back to summary

private final Enum FCDIterCollationIterator.State

extends Enum<FCDIterCollationIterator.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final FCDIterCollationIterator.State
IN_NORM_ITER_AT_LIMIT

The input text [start..limit[ failed the FCD check and was normalized.

public static final FCDIterCollationIterator.State
IN_NORM_ITER_AT_START

The input text [start..limit[ failed the FCD check and was normalized.

public static final FCDIterCollationIterator.State
ITER_CHECK_BWD

The input text [(iter index)..limit[ passes the FCD check.

public static final FCDIterCollationIterator.State
ITER_CHECK_FWD

The input text [start..(iter index)[ passes the FCD check.

public static final FCDIterCollationIterator.State
ITER_IN_FCD_SEGMENT

The input text [start..limit[ passes the FCD check.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FCDIterCollationIterator.State
public static FCDIterCollationIterator.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

IN_NORM_ITER_AT_LIMITback to summary
public static final FCDIterCollationIterator.State IN_NORM_ITER_AT_LIMIT

The input text [start..limit[ failed the FCD check and was normalized. pos tracks the current index in the normalized string. The text iterator is at the limit index.

IN_NORM_ITER_AT_STARTback to summary
public static final FCDIterCollationIterator.State IN_NORM_ITER_AT_START

The input text [start..limit[ failed the FCD check and was normalized. pos tracks the current index in the normalized string. The text iterator is at the start index.

ITER_CHECK_BWDback to summary
public static final FCDIterCollationIterator.State ITER_CHECK_BWD

The input text [(iter index)..limit[ passes the FCD check. Moving backward checks incrementally. start & pos are undefined.

ITER_CHECK_FWDback to summary
public static final FCDIterCollationIterator.State ITER_CHECK_FWD

The input text [start..(iter index)[ passes the FCD check. Moving forward checks incrementally. pos & limit are undefined.

ITER_IN_FCD_SEGMENTback to summary
public static final FCDIterCollationIterator.State ITER_IN_FCD_SEGMENT

The input text [start..limit[ passes the FCD check. pos tracks the current text index.

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static FCDIterCollationIterator.State valueOf(String name)
valuesback to summary
public static FCDIterCollationIterator.State[] values()