public interface SqlNameMatcher
Originally derived from Apache Calcite's name matching framework.
SqlNameMatchers| Modifier and Type | Method and Description |
|---|---|
String |
bestString()
Returns the most recent match.
|
Set<String> |
createSet()
Creates a set that has the same case-sensitivity as this matcher.
|
default List<String> |
distinctCopy(Iterable<String> names)
Returns a copy of a collection, removing duplicates and retaining
iteration order.
|
int |
frequency(Iterable<String> names,
String name)
Returns how many times a string occurs in a collection.
|
<K extends List<String>,V> |
get(Map<K,V> map,
List<String> prefixNames,
List<String> names)
Looks up an item in a map.
|
default int |
indexOf(Iterable<String> names,
String name)
Returns the index of the first element of a collection that matches.
|
boolean |
isCaseSensitive()
Returns whether name matching is case-sensitive.
|
boolean |
matches(String string,
String name)
Returns whether a name matches another.
|
boolean isCaseSensitive()
boolean matches(String string, String name)
string - Name written in codename - Name of object we are trying to match<K extends List<String>,V> V get(Map<K,V> map, List<String> prefixNames, List<String> names)
map - Map to searchprefixNames - Prefix names to prependnames - Names to search forString bestString()
In the default implementation,
throws UnsupportedOperationException.
int frequency(Iterable<String> names, String name)
Similar to Collections.frequency(java.util.Collection<?>, java.lang.Object).
default List<String> distinctCopy(Iterable<String> names)
default int indexOf(Iterable<String> names, String name)