Modifier and Type | Field and Description |
---|---|
static ResourceCollection |
EMPTY
Empty
ResourceCollection object. |
Modifier and Type | Method and Description |
---|---|
Resource |
get(int index)
Returns the resource element at the specified position in this resource collection.
|
Collection<Resource> |
getCollection()
Returns a read-only collection over elements of type
Resource . |
int |
size()
Returns the number of elements in this resource collection.
|
forEach, iterator, spliterator
static final ResourceCollection EMPTY
ResourceCollection
object.Collection<Resource> getCollection()
Resource
.
This method is provided for templating language such as Freemarker
because Freemarker doesn't allow to list or iterator an Iterable
directly as of v2.3.x. for
instance.
int size()
Resource get(int index)
index
- index of the resource element to returnIndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= size())Copyright © 2017–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.