Top Fields Constructors Methods
com.ibm.icu.text

pack-priv Class Quantifier

extends Object
implements UnicodeMatcher
Class Inheritance
All Implemented Interfaces
com.ibm.icu.text.UnicodeMatcher
Imports
com.ibm.icu.impl.Utility

Field Summary

Modifier and TypeField and Description
private UnicodeMatcher
public static final int
MAX

Maximum count a quantifier can have.

private int
private int

Constructor Summary

AccessConstructor and Description
public
Quantifier(UnicodeMatcher theMatcher, int theMinCount, int theMaxCount)

Method Summary

Modifier and TypeMethod and Description
public void

Returns:

a reference to toUnionTo
addMatchSetTo
(UnicodeSet
the set into which to union the source characters
toUnionTo
)

Implements com.ibm.icu.text.UnicodeMatcher.addMatchSetTo.

Implementation of UnicodeMatcher API.
public int
matches(Replaceable
the text to be matched
text
,
int[]
on input, the index into text at which to begin matching. On output, the limit of the matched text. The number of matched characters is the output value of offset minus the input value. Offset should always point to the HIGH SURROGATE (leading code unit) of a pair of surrogates, both on entry and upon return.
offset
,
int
the limit index of text to be matched. Greater than offset for a forward direction match, less than offset for a backward direction match. The last character to be considered for matching will be text.charAt(limit-1) in the forward direction or text.charAt(limit+1) in the backward direction.
limit
,
boolean
if true, then assume further characters may be inserted at limit and check for partial matching. Otherwise assume the text as given is complete.
incremental
)

Implements com.ibm.icu.text.UnicodeMatcher.matches.

Implement UnicodeMatcher API.
public boolean
matchesIndexValue(int v)

Implements com.ibm.icu.text.UnicodeMatcher.matchesIndexValue.

Implement UnicodeMatcher API
public String
toPattern(boolean
if true then convert unprintable character to their hex escape representations, \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E.
escapeUnprintable
)

Implements com.ibm.icu.text.UnicodeMatcher.toPattern.

Implement UnicodeMatcher API
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

matcherback to summary
private UnicodeMatcher matcher
MAXback to summary
public static final int MAX

Maximum count a quantifier can have.

maxCountback to summary
private int maxCount
minCountback to summary
private int minCount

Constructor Detail

Quantifierback to summary
public Quantifier(UnicodeMatcher theMatcher, int theMinCount, int theMaxCount)

Method Detail

addMatchSetToback to summary
public void addMatchSetTo(UnicodeSet toUnionTo)

Implements com.ibm.icu.text.UnicodeMatcher.addMatchSetTo.

Implementation of UnicodeMatcher API. Union the set of all characters that may be matched by this object into the given set.

Parameters
toUnionTo:UnicodeSet

the set into which to union the source characters

Returns:void

a reference to toUnionTo

matchesback to summary
public int matches(Replaceable text, int[] offset, int limit, boolean incremental)

Implements com.ibm.icu.text.UnicodeMatcher.matches.

Implement UnicodeMatcher API.

Parameters
text:Replaceable

Doc from com.ibm.icu.text.UnicodeMatcher.matches.

the text to be matched

offset:int[]

Doc from com.ibm.icu.text.UnicodeMatcher.matches.

on input, the index into text at which to begin matching. On output, the limit of the matched text. The number of matched characters is the output value of offset minus the input value. Offset should always point to the HIGH SURROGATE (leading code unit) of a pair of surrogates, both on entry and upon return.

limit:int

Doc from com.ibm.icu.text.UnicodeMatcher.matches.

the limit index of text to be matched. Greater than offset for a forward direction match, less than offset for a backward direction match. The last character to be considered for matching will be text.charAt(limit-1) in the forward direction or text.charAt(limit+1) in the backward direction.

incremental:boolean

Doc from com.ibm.icu.text.UnicodeMatcher.matches.

if true, then assume further characters may be inserted at limit and check for partial matching. Otherwise assume the text as given is complete.

Returns:int

Doc from com.ibm.icu.text.UnicodeMatcher.matches.

a match degree value indicating a full match, a partial match, or a mismatch. If incremental is false then U_PARTIAL_MATCH should never be returned.

matchesIndexValueback to summary
public boolean matchesIndexValue(int v)

Implements com.ibm.icu.text.UnicodeMatcher.matchesIndexValue.

Implement UnicodeMatcher API

toPatternback to summary
public String toPattern(boolean escapeUnprintable)

Implements com.ibm.icu.text.UnicodeMatcher.toPattern.

Implement UnicodeMatcher API

Parameters
escapeUnprintable:boolean

Doc from com.ibm.icu.text.UnicodeMatcher.toPattern.

if true then convert unprintable character to their hex escape representations, \\uxxxx or \\Uxxxxxxxx. Unprintable characters are those other than U+000A, U+0020..U+007E.