Package org.apache.spark.sql.util
Class CaseInsensitiveStringMap
Object
org.apache.spark.sql.util.CaseInsensitiveStringMap
Case-insensitive map of string keys to string values.
This is used to pass options to v2 implementations to ensure consistent case insensitivity.
Methods that return keys in this map, like entrySet() and keySet(), return
keys converted to lower case. This map doesn't allow null key.
- Since:
- 3.0.0
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the original case-sensitive map.voidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) static CaseInsensitiveStringMapempty()entrySet()booleanbooleangetBoolean(String key, boolean defaultValue) Returns the boolean value to which the specified key is mapped, or defaultValue if there is no mapping for the key.doubleReturns the double value to which the specified key is mapped, or defaultValue if there is no mapping for the key.intReturns the integer value to which the specified key is mapped, or defaultValue if there is no mapping for the key.longReturns the long value to which the specified key is mapped, or defaultValue if there is no mapping for the key.inthashCode()booleanisEmpty()keySet()voidintsize()values()Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CaseInsensitiveStringMap
-
-
Method Details
-
empty
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,String>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,String>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
getBoolean
Returns the boolean value to which the specified key is mapped, or defaultValue if there is no mapping for the key. The key match is case-insensitive. -
getInt
Returns the integer value to which the specified key is mapped, or defaultValue if there is no mapping for the key. The key match is case-insensitive. -
getLong
Returns the long value to which the specified key is mapped, or defaultValue if there is no mapping for the key. The key match is case-insensitive. -
getDouble
Returns the double value to which the specified key is mapped, or defaultValue if there is no mapping for the key. The key match is case-insensitive. -
asCaseSensitiveMap
Returns the original case-sensitive map. -
equals
-
hashCode
public int hashCode()
-