com.mysema.query.group
Class ValueTransformerMap<K,V,T>

java.lang.Object
  extended by java.util.AbstractMap<K,T>
      extended by com.mysema.query.group.ValueTransformerMap<K,V,T>
Type Parameters:
K - Key type of this map
V - Original value type; input type for the Transformer
T - Target value type; output type of the Transformer
All Implemented Interfaces:
Map<K,T>

public class ValueTransformerMap<K,V,T>
extends AbstractMap<K,T>

A read-only view of underlying map with values transformed by a given Transformer.

Author:
sasa

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
ValueTransformerMap(Map<K,V> map, org.apache.commons.collections15.Transformer<? super V,? extends T> transformer)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
static
<K,V,T> Map<K,T>
create(Map<K,V> map, org.apache.commons.collections15.Transformer<? super V,? extends T> transformer)
           
 Set<Map.Entry<K,T>> entrySet()
           
 T get(Object key)
           
 boolean isEmpty()
           
 Set<K> keySet()
           
 T put(K key, T value)
           
 void putAll(Map<? extends K,? extends T> m)
           
 T remove(Object key)
           
 int size()
           
 Collection<T> values()
           
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueTransformerMap

public ValueTransformerMap(Map<K,V> map,
                           org.apache.commons.collections15.Transformer<? super V,? extends T> transformer)
Method Detail

create

public static <K,V,T> Map<K,T> create(Map<K,V> map,
                                      org.apache.commons.collections15.Transformer<? super V,? extends T> transformer)

size

public int size()
Specified by:
size in interface Map<K,T>
Overrides:
size in class AbstractMap<K,T>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<K,T>
Overrides:
isEmpty in class AbstractMap<K,T>

containsKey

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

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<K,T>
Overrides:
containsValue in class AbstractMap<K,T>

get

public T get(Object key)
Specified by:
get in interface Map<K,T>
Overrides:
get in class AbstractMap<K,T>

put

public T put(K key,
             T value)
Specified by:
put in interface Map<K,T>
Overrides:
put in class AbstractMap<K,T>

remove

public T remove(Object key)
Specified by:
remove in interface Map<K,T>
Overrides:
remove in class AbstractMap<K,T>

putAll

public void putAll(Map<? extends K,? extends T> m)
Specified by:
putAll in interface Map<K,T>
Overrides:
putAll in class AbstractMap<K,T>

clear

public void clear()
Specified by:
clear in interface Map<K,T>
Overrides:
clear in class AbstractMap<K,T>

keySet

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

values

public Collection<T> values()
Specified by:
values in interface Map<K,T>
Overrides:
values in class AbstractMap<K,T>

entrySet

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


Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.