|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap java.util.HashMap java.util.LinkedHashMap com.adaptc.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:
resources.get('resource1').total = 1
resources.get(PluginConstants.RESOURCE_PROCESSORS).total = 4
resources['resource1'].total = 1
resources[PluginConstants.RESOURCE_PROCESSORS].total = 4
resources.resource1.total = 1
resources."${PluginConstants.RESOURCE_PROCESSORS}".total = 4
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 |
---|
private static final long serialVersionUID
Constructor Detail |
---|
ReportResourceMap()
Method Detail |
---|
de public public ReportResource get(Object key)
key
- The key to retrieve
public ReportResource getAt(String key)
resources['resource1'].total = 1
resources[PluginConstants.RESOURCE_PROCESSORS].total = 4
key
- The key to retrieve
public Object propertyMissing(String key)
resources.resource1.total = 1
resources."${PluginConstants.RESOURCE_PROCESSORS}".total = 4
key
- The key to retrieve
Groovy Documentation