public class PrefixFinder extends Object
Constructor and Description |
---|
PrefixFinder() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
find(SortedSet<String> set,
String input)
Extracts prefixes of a given string from a SortedSet.
|
static List<String> |
findKeys(SortedMap<String,?> map,
String input) |
protected static SortedSet<String> |
headSetInclusive(SortedSet<String> set,
String input) |
public static List<String> find(SortedSet<String> set, String input)
Put another way, for every element in the result list, the following expression will be true: string.startsWith(element.getKey()).
set
- the sorted set containing potential prefixesinput
- the string whose prefixes to findprotected static SortedSet<String> headSetInclusive(SortedSet<String> set, String input)
Copyright © 2003-2014 Internet Archive. All Rights Reserved.