common-util

local.tomas.util.collections
Class SimpleMappedMap<K,F,T>

java.lang.Object
  extended by local.tomas.util.collections.MappedMap<K,K,F,T>
      extended by local.tomas.util.collections.SimpleMappedMap<K,F,T>
Type Parameters:
K - key type
F - source type
T - target type
All Implemented Interfaces:
Map<K,T>

public class SimpleMappedMap<K,F,T>
extends MappedMap<K,K,F,T>
implements Map<K,T>

Simple mapped map.

Author:
tomas.teubner

Nested Class Summary
protected static class SimpleMappedMap.SimpleEntry<J,V>
          A simple map entry.
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class local.tomas.util.collections.MappedMap
keyMapping, map, valueMapping
 
Constructor Summary
SimpleMappedMap(Class<K> keyClass, Map<K,F> map, ObjectMapping<T> valueMapping)
          Construct mapping.
 
Method Summary
 boolean containsKey(Object key)
           
 Set<Map.Entry<K,T>> entrySet()
           
 Set<K> keySet()
           
 
Methods inherited from class local.tomas.util.collections.MappedMap
clear, containsValue, get, isEmpty, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size, values
 

Constructor Detail

SimpleMappedMap

public SimpleMappedMap(Class<K> keyClass,
                       Map<K,F> map,
                       ObjectMapping<T> valueMapping)
Construct mapping.

Parameters:
keyClass - key class
map - original map
valueMapping - value mapping
Method Detail

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<K,T>
Overrides:
containsKey in class MappedMap<K,K,F,T>

entrySet

public Set<Map.Entry<K,T>> entrySet()
Specified by:
entrySet in interface Map<K,T>
Overrides:
entrySet in class MappedMap<K,K,F,T>

keySet

public Set<K> keySet()
Specified by:
keySet in interface Map<K,T>
Overrides:
keySet in class MappedMap<K,K,F,T>

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.