Operations on Collection Objects
The EL supports operations on collection objects: sets, lists, and maps. It allows the dynamic creation of collection objects, which can then be operated on using streams and pipelines.
For example, you can construct a set as follows:
You can construct a list as follows; a list can contain various types of items:
You can construct a map by using a colon to define the entries, as follows:
You operate on collection objects using method calls to the stream of elements derived from the collection. Some operations return another stream, which allows additional operations. Therefore, you can chain these operations together in a pipeline.
A stream pipeline consists of the following:
For example, you might generate a list of titles of history books as follows:
The following simpler example returns a sorted version of the original list:
Streams and stream operations are documented in the Java SE 8 API
documentation, available at
See the EL specification at