Groovy Documentation

com.ace.mws.plugins
[Java] Class ReportResourceMap

java.lang.Object
  java.util.AbstractMap
      java.util.HashMap
          java.util.LinkedHashMap
              com.ace.mws.plugins.ReportResourceMap

public class ReportResourceMap
extends LinkedHashMap

A map containing String to ReportResource values. If entries are attempted to be accessed that do not exist, they are automatically created, allowing a more fluent usage instead of checking for null values before adding resources. Additionally, this class may be accessed in one of several ways:

Authors:
bsaville


Field Summary
private static long serialVersionUID

 
Constructor Summary
ReportResourceMap()

 
Method Summary
ReportResource get(Object key)

Retrieves an entry and creates it if it does not already exist.

ReportResource getAt(String key)

Allows array-like access to entries.

Object propertyMissing(String key)

Allows property access to entries.

 
Methods inherited from class LinkedHashMap
get, clear, containsValue, put, values, clone, isEmpty, entrySet, putAll, size, remove, keySet, containsKey, equals, toString, hashCode, wait, wait, wait, getClass, notify, notifyAll
 
Methods inherited from class HashMap
get, put, values, clone, clear, isEmpty, entrySet, putAll, size, remove, keySet, containsKey, containsValue, equals, toString, hashCode, wait, wait, wait, getClass, notify, notifyAll
 

Field Detail

serialVersionUID

private static final long serialVersionUID


 
Constructor Detail

ReportResourceMap

ReportResourceMap()


 
Method Detail

get

de
	public
public ReportResource get(Object key)
Retrieves an entry and creates it if it does not already exist.
Parameters:
key - The key to retrieve
Returns:
A ReportResource value, never null


getAt

public ReportResource getAt(String key)
Allows array-like access to entries.
resources['resource1'].total = 1
resources[PluginConstants.RESOURCE_PROCESSORS].total = 4
Parameters:
key - The key to retrieve
Returns:
A ReportResource value, never null


propertyMissing

public Object propertyMissing(String key)
Allows property access to entries.
resources.resource1.total = 1
resources."${PluginConstants.RESOURCE_PROCESSORS}".total = 4
Parameters:
key - The key to retrieve
Returns:
A ReportResource value, never null


 

Groovy Documentation