Interface SqlNameMatcher
public interface SqlNameMatcher
Checks whether two names are the same according to a case-sensitivity policy.
This is a standalone version that can be used independently of Apache Calcite.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the most recent match.Creates a set that has the same case-sensitivity as this matcher.distinctCopy(Iterable<String> names) Returns a copy of a collection, removing duplicates and retaining iteration order.intReturns how many times a string occurs in a collection.Looks up an item in a map.default intReturns the index of the first element of a collection that matches.booleanReturns whether name matching is case-sensitive.booleanReturns whether a name matches another.
-
Method Details
-
isCaseSensitive
boolean isCaseSensitive()Returns whether name matching is case-sensitive. -
matches
Returns whether a name matches another.- Parameters:
string- Name written in codename- Name of object we are trying to match- Returns:
- Whether matches
-
get
<K extends List<String>,V> @Nullable V get(Map<K, V> map, List<String> prefixNames, List<String> names) Looks up an item in a map.- Parameters:
map- Map to searchprefixNames- Prefix names to prependnames- Names to search for- Returns:
- Value if found, null otherwise
-
bestString
Returns the most recent match.In the default implementation, throws
UnsupportedOperationException. -
frequency
Returns how many times a string occurs in a collection.Similar to
Collections.frequency(java.util.Collection<?>, java.lang.Object). -
distinctCopy
Returns a copy of a collection, removing duplicates and retaining iteration order. -
indexOf
Returns the index of the first element of a collection that matches. -
createSet
Creates a set that has the same case-sensitivity as this matcher.
-