Class DefaultWriteableMap<T>
java.lang.Object
ch.tocco.nice2.toolbox.api.collection.DefaultWriteableMap<T>
- All Implemented Interfaces:
ReadOnlyMap<T>
,WriteableMap<T>
- Direct Known Subclasses:
MailWorkerContextImpl
,ReaderResult
Default implementation of WriteableMap
which uses a map of object values.
Note that any getter may throw a ClassCastException
when casting the object down to the
requested type, though this does not happen, when only the interface methods are used to put
values in the map.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(T key) boolean
@Nullable Boolean
getBoolean
(T key) @org.jetbrains.annotations.Nullable boolean
getBoolean
(T key, boolean fallback) @Nullable Date
@Nullable Date
@Nullable BigDecimal
getDecimal
(T key) @Nullable BigDecimal
getDecimal
(T key, BigDecimal fallback) @Nullable Double
@org.jetbrains.annotations.Nullable double
<S extends Enum<S>>
S<S extends Enum<S>>
S@Nullable Float
@org.jetbrains.annotations.Nullable float
@Nullable Integer
@org.jetbrains.annotations.Nullable int
@Nullable Long
@org.jetbrains.annotations.Nullable long
@Nullable String
@Nullable String
<V> V
<V> V
Gives direct access to the underlying map.int
hashCode()
keySet()
Returns an immutable view of all keys.boolean
removeValue
(T key) boolean
setBoolean
(T key, boolean bool) boolean
boolean
setDecimal
(T key, BigDecimal value) boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
Sets the underlying map.toString()
-
Constructor Details
-
DefaultWriteableMap
-
DefaultWriteableMap
public DefaultWriteableMap()
-
-
Method Details
-
getValues
Gives direct access to the underlying map. -
setValues
Sets the underlying map. -
removeValue
- Specified by:
removeValue
in interfaceWriteableMap<T>
-
setValue
- Specified by:
setValue
in interfaceWriteableMap<T>
-
getValue
-
setString
- Specified by:
setString
in interfaceWriteableMap<T>
-
setBoolean
- Specified by:
setBoolean
in interfaceWriteableMap<T>
-
setInt
- Specified by:
setInt
in interfaceWriteableMap<T>
-
setLong
- Specified by:
setLong
in interfaceWriteableMap<T>
-
setDouble
- Specified by:
setDouble
in interfaceWriteableMap<T>
-
setFloat
- Specified by:
setFloat
in interfaceWriteableMap<T>
-
setDecimal
- Specified by:
setDecimal
in interfaceWriteableMap<T>
-
setEnum
- Specified by:
setEnum
in interfaceWriteableMap<T>
-
setDate
- Specified by:
setDate
in interfaceWriteableMap<T>
-
getString
- Specified by:
getString
in interfaceReadOnlyMap<T>
-
getString
- Specified by:
getString
in interfaceReadOnlyMap<T>
-
getBoolean
- Specified by:
getBoolean
in interfaceReadOnlyMap<T>
-
getBoolean
- Specified by:
getBoolean
in interfaceReadOnlyMap<T>
-
getInt
- Specified by:
getInt
in interfaceReadOnlyMap<T>
-
getInt
- Specified by:
getInt
in interfaceReadOnlyMap<T>
-
getLong
- Specified by:
getLong
in interfaceReadOnlyMap<T>
-
getLong
- Specified by:
getLong
in interfaceReadOnlyMap<T>
-
getFloat
- Specified by:
getFloat
in interfaceReadOnlyMap<T>
-
getFloat
- Specified by:
getFloat
in interfaceReadOnlyMap<T>
-
getDouble
- Specified by:
getDouble
in interfaceReadOnlyMap<T>
-
getDouble
- Specified by:
getDouble
in interfaceReadOnlyMap<T>
-
getDecimal
- Specified by:
getDecimal
in interfaceReadOnlyMap<T>
-
getDecimal
- Specified by:
getDecimal
in interfaceReadOnlyMap<T>
-
getEnum
- Specified by:
getEnum
in interfaceReadOnlyMap<T>
-
getEnum
- Specified by:
getEnum
in interfaceReadOnlyMap<T>
-
getDate
- Specified by:
getDate
in interfaceReadOnlyMap<T>
-
getDate
- Specified by:
getDate
in interfaceReadOnlyMap<T>
-
getValue
- Specified by:
getValue
in interfaceReadOnlyMap<T>
-
getValue
- Specified by:
getValue
in interfaceReadOnlyMap<T>
-
keySet
Description copied from interface:ReadOnlyMap
Returns an immutable view of all keys.- Specified by:
keySet
in interfaceReadOnlyMap<T>
-
containsKey
- Specified by:
containsKey
in interfaceReadOnlyMap<T>
-
clear
public void clear()- Specified by:
clear
in interfaceWriteableMap<T>
-
equals
-
hashCode
public int hashCode() -
toString
-