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:
java.util.Map<K,V>
public class CmsConstantMap<K,V> extends java.lang.Object implements java.util.Map<K,V>
Returns the constant Object the map was initialized with for allget(Object)calls, regardless of what the actual key is.- Since:
- 7.0.2
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.Boolean>CONSTANT_BOOLEAN_FALSE_MAPConstant Map that always returnsBoolean.FALSE.static java.util.Map<java.lang.String,java.lang.Boolean>CONSTANT_BOOLEAN_TRUE_MAPConstant Map that always returnsBoolean.TRUE.static java.util.Map<java.lang.String,java.util.List<CmsJspContentAccessValueWrapper>>CONSTANT_EMPTY_LIST_MAPConstant Map that always returns an empty list.static java.util.Map<java.lang.String,java.lang.String>CONSTANT_EMPTY_STRING_MAPConstant Map that always returns an empty list.
-
Constructor Summary
Constructors Constructor Description CmsConstantMap(V constant)Creates a new constant Map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()booleanequals(java.lang.Object obj)Vget(java.lang.Object key)inthashCode()booleanisEmpty()java.util.Set<K>keySet()Vput(java.lang.Object arg0, java.lang.Object arg1)voidputAll(java.util.Map<? extends K,? extends V> arg0)Vremove(java.lang.Object key)intsize()java.util.Collection<V>values()
-
-
-
Field Detail
-
CONSTANT_BOOLEAN_FALSE_MAP
public static final java.util.Map<java.lang.String,java.lang.Boolean> CONSTANT_BOOLEAN_FALSE_MAP
Constant Map that always returnsBoolean.FALSE.
-
CONSTANT_BOOLEAN_TRUE_MAP
public static final java.util.Map<java.lang.String,java.lang.Boolean> CONSTANT_BOOLEAN_TRUE_MAP
Constant Map that always returnsBoolean.TRUE.
-
CONSTANT_EMPTY_LIST_MAP
public static final java.util.Map<java.lang.String,java.util.List<CmsJspContentAccessValueWrapper>> CONSTANT_EMPTY_LIST_MAP
Constant Map that always returns an empty list.
-
CONSTANT_EMPTY_STRING_MAP
public static final java.util.Map<java.lang.String,java.lang.String> CONSTANT_EMPTY_STRING_MAP
Constant Map that always returns an empty list.
-
-
Constructor Detail
-
CmsConstantMap
public CmsConstantMap(V constant)
Creates a new constant Map.- Parameters:
constant- the constant to return for allget(Object)calls.
-
-
Method Detail
-
clear
public void clear()
-
containsKey
public boolean containsKey(java.lang.Object key)
-
containsValue
public boolean containsValue(java.lang.Object value)
-
equals
public boolean equals(java.lang.Object obj)
-
hashCode
public int hashCode()
-
isEmpty
public boolean isEmpty()
-
-