FileDocCategorySizeDatePackage
MapGetterInvocationHandler.javaAPI DocGlassfish v2 API3524Fri May 04 22:30:52 BST 2007com.sun.appserv.management.j2ee.statistics

MapGetterInvocationHandler

public class MapGetterInvocationHandler extends GetterInvocationHandler implements Serializable
Implements getXXX() based on a Map whose keys are the XXX part of the getXXX() method name. Serializable so that it may be used to return a result remotely.
Internal use only

Fields Summary
static final long
serialVersionUID
private final Map
mMap
Constructors Summary
public MapGetterInvocationHandler(Map map)
Create a new instance using the Map, which is not copied.

	
			          	 
		
	    
	
		mMap	= map;
	
Methods Summary
protected booleancontainsValue(java.lang.String name)

		return( mMap.containsKey( name ) );
	
public booleanequals(java.lang.Object rhsIn)

		boolean	equals	= false;
		
		if ( rhsIn instanceof MapGetterInvocationHandler )
		{
		    final MapGetterInvocationHandler<?> rhs = 
		        MapGetterInvocationHandler.class.cast( rhsIn );
		        
			equals	= MapUtil.mapsEqual( getMap(), rhs.getMap() );
		}
		 
		return( equals );
	
protected java.util.MapgetMap()

		return( mMap );
	
protected TgetValue(java.lang.String name)

		return( mMap.get( name ) );
	
public inthashCode()

 	    return ObjectUtil.hashCode( mMap );
 	
public java.lang.StringtoString()

		return( MapUtil.toString( mMap ) );