Package muntjac :: Package terminal :: Module key_mapper :: Class KeyMapper
[hide private]
[frames] | no frames]

Class KeyMapper

source code

object --+
         |
        KeyMapper

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


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
key(self, o)
Gets key for an object.
source code
 
get(self, key)
Retrieves object with the key.
source code
 
remove(self, removeobj)
Removes object from the mapper.
source code
 
removeAll(self)
Removes all objects from the mapper.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

key(self, o)

source code 

Gets key for an object.

Parameters:
  • o - the object.

get(self, key)

source code 

Retrieves object with the key.

Parameters:
  • key - the name with the desired value.
Returns:
the object with the key.

remove(self, removeobj)

source code 

Removes object from the mapper.

Parameters:
  • removeobj - the object to be removed.