Package com.ibm.icu.impl
Class TimeZoneNamesImpl.NameSearchHandler
java.lang.Object
com.ibm.icu.impl.TimeZoneNamesImpl.NameSearchHandler
- All Implemented Interfaces:
TextTrieMap.ResultHandler<TimeZoneNamesImpl.NameInfo>
- Enclosing class:
TimeZoneNamesImpl
private static class TimeZoneNamesImpl.NameSearchHandler
extends Object
implements TextTrieMap.ResultHandler<TimeZoneNamesImpl.NameInfo>
NameSearchHandler is used for collecting name matches.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection
<TimeZoneNames.MatchInfo> private int
private EnumSet
<TimeZoneNames.NameType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the match resultsint
Returns the maximum match length, or 0 if no match was foundboolean
handlePrefixMatch
(int matchLength, Iterator<TimeZoneNamesImpl.NameInfo> values) Handles a prefix key matchvoid
Resets the match results
-
Field Details
-
_nameTypes
-
_matches
-
_maxMatchLen
private int _maxMatchLen
-
-
Constructor Details
-
NameSearchHandler
NameSearchHandler(EnumSet<TimeZoneNames.NameType> nameTypes)
-
-
Method Details
-
handlePrefixMatch
Description copied from interface:TextTrieMap.ResultHandler
Handles a prefix key match- Specified by:
handlePrefixMatch
in interfaceTextTrieMap.ResultHandler<TimeZoneNamesImpl.NameInfo>
- Parameters:
matchLength
- Matched key's lengthvalues
- An iterator of the objects associated with the matched key- Returns:
- Return true to continue the search in the trie, false to quit.
-
getMatches
Returns the match results- Returns:
- the match results
-
getMaxMatchLen
public int getMaxMatchLen()Returns the maximum match length, or 0 if no match was found- Returns:
- the maximum match length
-
resetResults
public void resetResults()Resets the match results
-