Read-only map view over a ResourceList that filters the list by resource type on each lookup. Returned by ResourceList.getOfType(), giving Velocity templates a map-style syntax such as folder.children.ofType.folder or articles.ofType.news instead of calling ResourceList.ofType(String) directly. Every lookup re-filters the backing list, so results are not cached, and calling code that needs the same filtered list more than once should hold onto the returned ResourceList rather than repeating the lookup. As a computed view rather than real storage, all mutating Map operations are unsupported.
Implements: Map
Properties
| Property | Returns | Description |
|---|---|---|
| empty | boolean | Always false. This view represents an unbounded set of possible type filters rather than a real, sizeable map, so it never reports as empty. |
Methods
isEmpty()
Returns: boolean
Always false. This view represents an unbounded set of possible type filters rather than a real, sizeable map, so it never reports as empty.
get(Object key)
Returns: ResourceList
Looks up the resources of a given type, keyed by the resource type name. This is the method Velocity invokes for map-style access such as folder.children.ofType.folder, so key is normally a type name like "folder" or "news" as supplied by the template; a null key returns null instead of throwing.
| Parameter | Description |
|---|---|
key | the resource type name to filter by, or null |