Package com.ibm.icu.impl
Class TimeZoneGenericNames.GenericNameSearchHandler
java.lang.Object
com.ibm.icu.impl.TimeZoneGenericNames.GenericNameSearchHandler
- All Implemented Interfaces:
TextTrieMap.ResultHandler<TimeZoneGenericNames.NameInfo>
- Enclosing class:
- TimeZoneGenericNames
private static class TimeZoneGenericNames.GenericNameSearchHandler
extends Object
implements TextTrieMap.ResultHandler<TimeZoneGenericNames.NameInfo>
A private class implementing the search callback interface in
TextTrieMap
for collecting match results.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionReturns the match resultsint
Returns the maximum match length, or 0 if no match was foundboolean
handlePrefixMatch
(int matchLength, Iterator<TimeZoneGenericNames.NameInfo> values) Handles a prefix key matchvoid
Resets the match results
-
Field Details
-
_types
-
_matches
-
_maxMatchLen
private int _maxMatchLen
-
-
Constructor Details
-
GenericNameSearchHandler
GenericNameSearchHandler(EnumSet<TimeZoneGenericNames.GenericNameType> types)
-
-
Method Details
-
handlePrefixMatch
Description copied from interface:TextTrieMap.ResultHandler
Handles a prefix key match- Specified by:
handlePrefixMatch
in interfaceTextTrieMap.ResultHandler<TimeZoneGenericNames.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
-