Package org.hippoecm.frontend.model.map
Class AbstractValueMap
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- org.hippoecm.frontend.model.map.AbstractValueMap
-
- Direct Known Subclasses:
AbstractPluginDecorator
,JcrPluginConfig
public abstract class AbstractValueMap extends AbstractMap<String,Object> implements org.apache.wicket.util.value.IValueMap
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Constructor Summary
Constructors Constructor Description AbstractValueMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
add(String key, String value)
Adds the value to thisValueMap
with the given key.void
clear()
Boolean
getAsBoolean(String key)
boolean
getAsBoolean(String key, boolean defaultValue)
Double
getAsDouble(String key)
double
getAsDouble(String key, double defaultValue)
Duration
getAsDuration(String key)
Duration
getAsDuration(String key, Duration defaultValue)
<T extends Enum<T>>
TgetAsEnum(String key, Class<T> eClass)
<T extends Enum<T>>
TgetAsEnum(String key, Class<T> eClass, T defaultValue)
<T extends Enum<T>>
TgetAsEnum(String key, T defaultValue)
Instant
getAsInstant(String key)
Integer
getAsInteger(String key)
int
getAsInteger(String key, int defaultValue)
Long
getAsLong(String key)
long
getAsLong(String key, long defaultValue)
Instant
getAsTime(String key, Instant defaultValue)
boolean
getBoolean(String key)
CharSequence
getCharSequence(String key)
double
getDouble(String key)
double
getDouble(String key, double defaultValue)
Duration
getDuration(String key)
Instant
getInstant(String key)
int
getInt(String key)
int
getInt(String key, int defaultValue)
String
getKey(String key)
long
getLong(String key)
long
getLong(String key, long defaultValue)
String
getString(String key)
String
getString(String key, String defaultValue)
String[]
getStringArray(String key)
org.apache.wicket.util.string.StringValue
getStringValue(String key)
boolean
isImmutable()
org.apache.wicket.util.value.IValueMap
makeImmutable()
void
putAll(Map<? extends String,? extends Object> map)
Object
remove(Object key)
String
toString()
Generates aString
representation of this object.-
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
isImmutable
public boolean isImmutable()
- Specified by:
isImmutable
in interfaceorg.apache.wicket.util.value.IValueMap
-
makeImmutable
public org.apache.wicket.util.value.IValueMap makeImmutable()
- Specified by:
makeImmutable
in interfaceorg.apache.wicket.util.value.IValueMap
-
clear
public void clear()
-
getBoolean
public boolean getBoolean(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getBoolean
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getBoolean(String)
-
getDouble
public double getDouble(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getDouble(String)
-
getDouble
public double getDouble(String key, double defaultValue) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getDouble(String, double)
-
getDuration
public Duration getDuration(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getDuration
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getDuration(String)
-
getInt
public int getInt(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getInt
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getInt(String)
-
getInt
public int getInt(String key, int defaultValue) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getInt
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getInt(String, int)
-
getLong
public long getLong(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getLong
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getLong(String)
-
getLong
public long getLong(String key, long defaultValue) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getLong
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getLong(String, long)
-
getString
public String getString(String key, String defaultValue)
- Specified by:
getString
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getString(String, String)
-
getString
public String getString(String key)
- Specified by:
getString
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getString(String)
-
getCharSequence
public CharSequence getCharSequence(String key)
- Specified by:
getCharSequence
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getCharSequence(String)
-
getStringArray
public String[] getStringArray(String key)
- Specified by:
getStringArray
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getStringArray(String)
-
getStringValue
public org.apache.wicket.util.string.StringValue getStringValue(String key)
- Specified by:
getStringValue
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getStringValue(String)
-
getInstant
public Instant getInstant(String key) throws org.apache.wicket.util.string.StringValueConversionException
- Specified by:
getInstant
in interfaceorg.apache.wicket.util.value.IValueMap
- Throws:
org.apache.wicket.util.string.StringValueConversionException
- See Also:
IValueMap.getInstant(String)
-
add
public Object add(String key, String value)
Adds the value to thisValueMap
with the given key. If the key already is in theValueMap
it will combine the values into aString
array, else it will just store the value itself.- Parameters:
key
- the key to store the value undervalue
- the value that must be added/merged to theValueMap
- Returns:
- the value itself if there was no previous value, or a
String
array with the combined values
-
putAll
public void putAll(Map<? extends String,? extends Object> map)
- Specified by:
putAll
in interfaceMap<String,Object>
- Overrides:
putAll
in classAbstractMap<String,Object>
- See Also:
Map.putAll(java.util.Map)
-
remove
public Object remove(Object key)
- Specified by:
remove
in interfaceMap<String,Object>
- Overrides:
remove
in classAbstractMap<String,Object>
- See Also:
Map.remove(java.lang.Object)
-
getKey
public String getKey(String key)
- Specified by:
getKey
in interfaceorg.apache.wicket.util.value.IValueMap
-
toString
public String toString()
Generates aString
representation of this object.- Overrides:
toString
in classAbstractMap<String,Object>
- Returns:
String
representation of thisValueMap
consistent with the tag-attribute style of markup elements. For example:a="x" b="y" c="z"
.
-
getAsBoolean
public Boolean getAsBoolean(String key)
- Specified by:
getAsBoolean
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsBoolean(String)
-
getAsBoolean
public boolean getAsBoolean(String key, boolean defaultValue)
- Specified by:
getAsBoolean
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsBoolean(String, boolean)
-
getAsInteger
public Integer getAsInteger(String key)
- Specified by:
getAsInteger
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsInteger(String)
-
getAsInteger
public int getAsInteger(String key, int defaultValue)
- Specified by:
getAsInteger
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsInteger(String, int)
-
getAsLong
public Long getAsLong(String key)
- Specified by:
getAsLong
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsLong(String)
-
getAsLong
public long getAsLong(String key, long defaultValue)
- Specified by:
getAsLong
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsLong(String, long)
-
getAsDouble
public Double getAsDouble(String key)
- Specified by:
getAsDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsDouble(String)
-
getAsDouble
public double getAsDouble(String key, double defaultValue)
- Specified by:
getAsDouble
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsDouble(String, double)
-
getAsDuration
public Duration getAsDuration(String key)
- Specified by:
getAsDuration
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsDuration(String)
-
getAsDuration
public Duration getAsDuration(String key, Duration defaultValue)
- Specified by:
getAsDuration
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsDuration(String, Duration)
-
getAsInstant
public Instant getAsInstant(String key)
- Specified by:
getAsInstant
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsInstant(String)
-
getAsTime
public Instant getAsTime(String key, Instant defaultValue)
- Specified by:
getAsTime
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsTime(String, Instant)
-
getAsEnum
public <T extends Enum<T>> T getAsEnum(String key, Class<T> eClass)
- Specified by:
getAsEnum
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsEnum(java.lang.String, java.lang.Class)
-
getAsEnum
public <T extends Enum<T>> T getAsEnum(String key, T defaultValue)
- Specified by:
getAsEnum
in interfaceorg.apache.wicket.util.value.IValueMap
- See Also:
IValueMap.getAsEnum(java.lang.String, java.lang.Enum)
-
-