org.millstone.base.terminal
Class KeyMapper

java.lang.Object
  |
  +--org.millstone.base.terminal.KeyMapper

public class KeyMapper
extends java.lang.Object

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

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

Constructor Summary
KeyMapper()
           
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Retrieve object with the key
 boolean isNewIdKey(java.lang.String key)
          Check if the key belongs to a new id.
 java.lang.String key(java.lang.Object o)
          Get key for an object
 void remove(java.lang.Object o)
          Remove object 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 java.lang.String key(java.lang.Object o)
Get key for an object


isNewIdKey

public boolean isNewIdKey(java.lang.String key)
Check 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


get

public java.lang.Object get(java.lang.String key)
Retrieve object with the key


remove

public void remove(java.lang.Object o)
Remove object from the mapper.



Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.