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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the original case-sensitive map.void
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) static CaseInsensitiveStringMap
empty()
entrySet()
boolean
boolean
getBoolean
(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.double
Returns the double value to which the specified key is mapped, or defaultValue if there is no mapping for the key.int
Returns the integer value to which the specified key is mapped, or defaultValue if there is no mapping for the key.long
Returns the long value to which the specified key is mapped, or defaultValue if there is no mapping for the key.int
hashCode()
boolean
isEmpty()
keySet()
void
int
size()
values()
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
containsKey
in interfaceMap<String,
String>
-
containsValue
- Specified by:
containsValue
in 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()
-