public class PlaceholderMetaMap
extends java.lang.Object
PlaceholderMap
. In particular
this map allows to store integers, longs, doubles, booleans and String
s only.Constructor and Description |
---|
PlaceholderMetaMap() |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.lang.String... keys)
Tells whether some data is stored for
key . |
boolean |
contains(java.lang.String key)
Tells whether some data is stored for
key . |
java.lang.Object |
get(java.lang.String key)
Gets the data that is stored for key
key . |
boolean |
getBoolean(java.lang.String key)
Gets the data that is stored for key
key . |
double |
getDouble(java.lang.String key)
Gets the data that is stored for key
key . |
int |
getInt(java.lang.String key)
Gets the data that is stored for key
key . |
long |
getLong(java.lang.String key)
Gets the data that is stored for key
key . |
java.lang.String |
getString(java.lang.String key)
Gets the data that is stored for key
key . |
java.lang.String[] |
keys()
Gets the keys of all the data that is stored.
|
void |
put(java.lang.String key,
java.lang.Object value)
Stores an additional key-value pair.
|
void |
putBoolean(java.lang.String key,
boolean value)
Stores an additional key-value pair.
|
void |
putInt(java.lang.String key,
int value)
Stores an additional key-value pair.
|
void |
putLong(java.lang.String key,
long value)
Stores an additional key-value pair.
|
void |
putString(java.lang.String key,
java.lang.String value)
Stores an additional key-value pair.
|
void |
putValue(java.lang.String key,
double value)
Stores an additional key-value pair.
|
java.lang.Object |
remove(java.lang.String key)
Removes
key from this map. |
public void putInt(java.lang.String key, int value)
key
- the keyvalue
- the valuepublic void putLong(java.lang.String key, long value)
key
- the keyvalue
- the valuepublic void putValue(java.lang.String key, double value)
key
- the keyvalue
- the valuepublic void putBoolean(java.lang.String key, boolean value)
key
- the keyvalue
- the valuepublic void putString(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic void put(java.lang.String key, java.lang.Object value)
key
- the keyvalue
- the valuepublic java.lang.Object remove(java.lang.String key)
key
from this map.key
- some key of an entry to removenull
public java.lang.String[] keys()
null
public java.lang.String getString(java.lang.String key)
key
.key
- the key of some entryjava.lang.IllegalArgumentException
- if there is nothing stored for key
or if the
stored object has the wrong typepublic int getInt(java.lang.String key)
key
.key
- the key of some entryjava.lang.IllegalArgumentException
- if there is nothing stored for key
or if the
stored object has the wrong typepublic long getLong(java.lang.String key)
key
.key
- the key of some entryjava.lang.IllegalArgumentException
- if there is nothing stored for key
or if the
stored object has the wrong typepublic double getDouble(java.lang.String key)
key
.key
- the key of some entryjava.lang.IllegalArgumentException
- if there is nothing stored for key
or if the
stored object has the wrong typepublic boolean getBoolean(java.lang.String key)
key
.key
- the key of some entryjava.lang.IllegalArgumentException
- if there is nothing stored for key
or if the
stored object has the wrong typepublic java.lang.Object get(java.lang.String key)
key
.key
- the key of some entrynull
public boolean contains(java.lang.String key)
key
.key
- the key to searchtrue
if data exists, false
otherwisepublic boolean contains(java.lang.String... keys)
key
.keys
- the keys to searchtrue
if data exists for all the keys, false
otherwise