Package org.opencms.util
Class CmsConstantMap<K,V>
java.lang.Object
org.opencms.util.CmsConstantMap<K,V>
- Type Parameters:
K
- the type of keys maintained by this mapV
- the type of mapped values
- All Implemented Interfaces:
Map<K,
V>
Returns the constant Object the map was initialized with for all
get(Object)
calls,
regardless of what the actual key is.- Since:
- 7.0.2
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionConstant Map that always returnsBoolean.FALSE
.Constant Map that always returnsBoolean.TRUE
.static final Map<String,
List<CmsJspContentAccessValueWrapper>> Constant Map that always returns an empty list.Constant Map that always returns an empty list. -
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, 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
-
Field Details
-
CONSTANT_BOOLEAN_FALSE_MAP
Constant Map that always returnsBoolean.FALSE
. -
CONSTANT_BOOLEAN_TRUE_MAP
Constant Map that always returnsBoolean.TRUE
. -
CONSTANT_EMPTY_LIST_MAP
Constant Map that always returns an empty list. -
CONSTANT_EMPTY_STRING_MAP
Constant Map that always returns an empty list.
-
-
Constructor Details
-
CmsConstantMap
Creates a new constant Map.- Parameters:
constant
- the constant to return for allget(Object)
calls.
-
-
Method Details
-
clear
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V> - See Also:
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V> - See Also:
-
entrySet
-
equals
-
get
-
hashCode
-
isEmpty
-
keySet
-
put
-
putAll
-
remove
-
size
-
values
-