Note a large number of additional predefined operations on collections:
As a convenience, extra operations are defined; for example, asSet() can be called on a set instance, and so on. Furthermore, you can convert a set or a bag to a sequence or ordered set using the sortedBy operation. This operation results in a sequence with a certain order, instead of a random sequence as is the case with the asSequence operation. |