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 intprivate EnumSet<TimeZoneNames.NameType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the match resultsintReturns the maximum match length, or 0 if no match was foundbooleanhandlePrefixMatch(int matchLength, Iterator<TimeZoneNamesImpl.NameInfo> values) Handles a prefix key matchvoidResets 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.ResultHandlerHandles a prefix key match- Specified by:
handlePrefixMatchin 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
-