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 java.lang.Object implements TextTrieMap.ResultHandler<TimeZoneGenericNames.NameInfo>
A private class implementing the search callback interface inTextTrieMap
for collecting match results.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<TimeZoneGenericNames.GenericMatchInfo>
_matches
private int
_maxMatchLen
private java.util.EnumSet<TimeZoneGenericNames.GenericNameType>
_types
-
Constructor Summary
Constructors Constructor Description GenericNameSearchHandler(java.util.EnumSet<TimeZoneGenericNames.GenericNameType> types)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<TimeZoneGenericNames.GenericMatchInfo>
getMatches()
Returns the match resultsint
getMaxMatchLen()
Returns the maximum match length, or 0 if no match was foundboolean
handlePrefixMatch(int matchLength, java.util.Iterator<TimeZoneGenericNames.NameInfo> values)
Handles a prefix key matchvoid
resetResults()
Resets the match results
-
-
-
Field Detail
-
_types
private java.util.EnumSet<TimeZoneGenericNames.GenericNameType> _types
-
_matches
private java.util.Collection<TimeZoneGenericNames.GenericMatchInfo> _matches
-
_maxMatchLen
private int _maxMatchLen
-
-
Constructor Detail
-
GenericNameSearchHandler
GenericNameSearchHandler(java.util.EnumSet<TimeZoneGenericNames.GenericNameType> types)
-
-
Method Detail
-
handlePrefixMatch
public boolean handlePrefixMatch(int matchLength, java.util.Iterator<TimeZoneGenericNames.NameInfo> values)
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
public java.util.Collection<TimeZoneGenericNames.GenericMatchInfo> 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
-
-