Package com.vaadin.server
Class KeyMapper<V>
- java.lang.Object
-
- com.vaadin.server.KeyMapper<V>
-
- All Implemented Interfaces:
Serializable
public class KeyMapper<V> extends Object implements Serializable
KeyMapper
is the simple two-way map for generating textual keys for objects and retrieving the objects later with the key.- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(String key)
Checks if the given key is mapped to an object.V
get(String key)
Retrieves object with the key.String
key(V o)
Gets key for an object.void
remove(V removeobj)
Removes object from the mapper.void
removeAll()
Removes all objects from the mapper.
-
-
-
Method Detail
-
get
public V get(String key)
Retrieves object with the key.- Parameters:
key
- the name with the desired value.- Returns:
- the object with the key.
-
remove
public void remove(V removeobj)
Removes object from the mapper.- Parameters:
removeobj
- the object to be removed.
-
removeAll
public void removeAll()
Removes all objects from the mapper.
-
containsKey
public boolean containsKey(String key)
Checks if the given key is mapped to an object.- Parameters:
key
- the key to check- Returns:
true
if the key is currently mapped,false
otherwise- Since:
- 7.7
-
-