com.itmill.toolkit.terminal
Class KeyMapper

java.lang.Object
  extended by com.itmill.toolkit.terminal.KeyMapper

public class KeyMapper
extends Object

KeyMapper is the simple two-way map for generating textual keys for objects and retrieving the objects later with the key.

Since:
3.0
Version:
4.1.4
Author:
IT Mill Ltd.

Constructor Summary
KeyMapper()
           
 
Method Summary
 Object get(String key)
          Retrieves object with the key.
 boolean isNewIdKey(String key)
          Checks if the key belongs to a new id.
 String key(Object o)
          Gets key for an object.
 void remove(Object removeobj)
          Removes object from the mapper.
 void removeAll()
          Removes all objects from the mapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyMapper

public KeyMapper()
Method Detail

key

public String key(Object o)
Gets key for an object.

Parameters:
o - the object.

isNewIdKey

public boolean isNewIdKey(String key)
Checks if the key belongs to a new id.

Usage of new id:s are specific to components, but for example Select component uses newItemId:s for selection of newly added items in allowNewItems-mode.

Parameters:
key -
Returns:
true if the key belongs to the new id,otherwise false.

get

public Object 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(Object removeobj)
Removes object from the mapper.

Parameters:
removeobj - the object to be removed.

removeAll

public void removeAll()
Removes all objects from the mapper.



Copyright © 2000-2008 IT Mill Ltd. All Rights Reserved.