com.twelvemonkeys.util
Class BeanMap

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.twelvemonkeys.util.BeanMap
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>

public final class BeanMap
extends AbstractMap<String,Object>
implements Serializable, Cloneable

A Map adapter for a Java Bean.

Ruthlessly stolen from Serialized Form


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
BeanMap(Object pBean)
           
 
Method Summary
 Set<Map.Entry<String,Object>> entrySet()
           
 Object get(Object pKey)
           
 Object put(String pKey, Object pValue)
           
 Object remove(Object pKey)
           
 int size()
           
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanMap

public BeanMap(Object pBean)
        throws IntrospectionException
Throws:
IntrospectionException
Method Detail

entrySet

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

get

public Object get(Object pKey)
Specified by:
get in interface Map<String,Object>
Overrides:
get in class AbstractMap<String,Object>

put

public Object put(String pKey,
                  Object pValue)
Specified by:
put in interface Map<String,Object>
Overrides:
put in class AbstractMap<String,Object>

remove

public Object remove(Object pKey)
Specified by:
remove in interface Map<String,Object>
Overrides:
remove in class AbstractMap<String,Object>

size

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


Copyright © 2014. All Rights Reserved.