Top Description Fields Constructors Methods
org.h2.value

public Class CaseInsensitiveConcurrentMap<V>

extends ConcurrentHashMap<String, V>
Class Inheritance
Type Parameters
<V>
the value type
Imports
java.util.concurrent.ConcurrentHashMap, org.h2.util.StringUtils

A concurrent hash map with case-insensitive string keys.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
containsKey(Object
possible key
key
)

Overrides java.util.concurrent.ConcurrentHashMap.containsKey.

Implements java.util.Map.containsKey.

Tests if the specified object is a key in this table.

public V
get(Object
the key whose associated value is to be returned
key
)

Overrides java.util.concurrent.ConcurrentHashMap.get.

Implements java.util.Map.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

public V
put(String
key with which the specified value is to be associated
key
,
V
value to be associated with the specified key
value
)

Overrides java.util.concurrent.ConcurrentHashMap.put.

Implements java.util.Map.put.

Maps the specified key to the specified value in this table.

public V
putIfAbsent(String
key with which the specified value is to be associated
key
,
V
value to be associated with the specified key
value
)

Overrides java.util.concurrent.ConcurrentHashMap.putIfAbsent.

Overrides default java.util.Map.putIfAbsent.

Implements java.util.concurrent.ConcurrentMap.putIfAbsent.

If the specified key is not already associated with a value, associates it with the given value.

public V
remove(Object
the key that needs to be removed
key
)

Overrides java.util.concurrent.ConcurrentHashMap.remove.

Implements java.util.Map.remove.

Removes the key (and its corresponding value) from this map.

Inherited from java.util.concurrent.ConcurrentHashMap:
clearcomputecomputeIfAbsentcomputeIfPresentcontainscontainsValueelementsentrySetequalsforEachforEachforEachforEachEntryforEachEntryforEachKeyforEachKeyforEachValueforEachValuegetOrDefaulthashCodeisEmptykeyskeySetkeySetmappingCountmergenewKeySetnewKeySetputAllreducereduceEntriesreduceEntriesreduceEntriesToDoublereduceEntriesToIntreduceEntriesToLongreduceKeysreduceKeysreduceKeysToDoublereduceKeysToIntreduceKeysToLongreduceToDoublereduceToIntreduceToLongreduceValuesreduceValuesreduceValuesToDoublereduceValuesToIntreduceValuesToLongremovereplacereplacereplaceAllsearchsearchEntriessearchKeyssearchValuessizetoStringvalues

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.concurrent.ConcurrentHashMap.serialVersionUID.

Constructor Detail

CaseInsensitiveConcurrentMapback to summary
public CaseInsensitiveConcurrentMap()

Method Detail

containsKeyback to summary
public boolean containsKey(Object key)

Overrides java.util.concurrent.ConcurrentHashMap.containsKey.

Implements java.util.Map.containsKey.

Doc from java.util.concurrent.ConcurrentHashMap.containsKey.

Tests if the specified object is a key in this table.

Parameters
key:Object

possible key

Returns:boolean

true if and only if the specified object is a key in this table, as determined by the equals method; false otherwise

Annotations
@Override
getback to summary
public V get(Object key)

Overrides java.util.concurrent.ConcurrentHashMap.get.

Implements java.util.Map.get.

Doc from java.util.concurrent.ConcurrentHashMap.get.

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

More formally, if this map contains a mapping from a key k to a value v such that key.equals(k), then this method returns v; otherwise it returns null. (There can be at most one such mapping.)

Parameters
key:Object

Doc from java.util.Map.get.

the key whose associated value is to be returned

Returns:V

Doc from java.util.Map.get.

the value to which the specified key is mapped, or null if this map contains no mapping for the key

Annotations
@Override
putback to summary
public V put(String key, V value)

Overrides java.util.concurrent.ConcurrentHashMap.put.

Implements java.util.Map.put.

Doc from java.util.concurrent.ConcurrentHashMap.put.

Maps the specified key to the specified value in this table. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters
key:String

key with which the specified value is to be associated

value:V

value to be associated with the specified key

Returns:V

the previous value associated with key, or null if there was no mapping for key

Annotations
@Override
putIfAbsentback to summary
public V putIfAbsent(String key, V value)

Overrides java.util.concurrent.ConcurrentHashMap.putIfAbsent.

Overrides default java.util.Map.putIfAbsent.

Implements java.util.concurrent.ConcurrentMap.putIfAbsent.

Doc from java.util.concurrent.ConcurrentHashMap.putIfAbsent.

If the specified key is not already associated with a value, associates it with the given value. This is equivalent to, for this map:

 if (!map.containsKey(key))
  return map.put(key, value);
else
  return map.get(key);
except that the action is performed atomically.
Parameters
key:String

Doc from java.util.concurrent.ConcurrentMap.putIfAbsent.

key with which the specified value is to be associated

value:V

Doc from java.util.concurrent.ConcurrentMap.putIfAbsent.

value to be associated with the specified key

Returns:V

the previous value associated with the specified key, or null if there was no mapping for the key

Annotations
@Override
removeback to summary
public V remove(Object key)

Overrides java.util.concurrent.ConcurrentHashMap.remove.

Implements java.util.Map.remove.

Doc from java.util.concurrent.ConcurrentHashMap.remove.

Removes the key (and its corresponding value) from this map. This method does nothing if the key is not in the map.

Parameters
key:Object

the key that needs to be removed

Returns:V

the previous value associated with key, or null if there was no mapping for key

Annotations
@Override