Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Using StreamMethods in a Gloop Service

Introduction

The StreamMethods one-liner class has been exposed so that Gloop developers can still use Java's Streams API in Gloop. The example Gloop services under the streams code directory of the examples package demonstrate how these one-liners are used.

Related articles

Please see the following articles for more information:

Try It!

Under the Coder Navigator, expand the examples package entry and navigate to the code folder. Afterwards, look for the streams package. This package contains directories and Gloop services shown below:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
examples
├── ...
└── code
    ├── ...
    └── streams
        ├── helper
        │   └── ProvidePeople.gloop
        ├── model
        │   └── Person.gloop
        ├── CountUnique.gloop
        ├── FilterByStartingWith.gloop
        ├── FirstFiveOver18.gloop
        ├── GroupByAge.gloop
        ├── SortAlphabetically.gloop
        └── StreamChaining.gloop

Simply run the services directly under streams to see the sample Gloop services in action.

Service Name Description
CountUnique.gloop Demonstrates the use of the distinct and count methods.
FilterByStartingWith.gloop Demonstrates how to filter an array of strings.
FirstFiveOver18.gloop Demonstrates the ability to use lazy loading.
GroupByAge.gloop Demonstrates how to group a map-like model.
SortAlphabetically.gloop Demonstrates how to sort an array.
StreamChaining.gloop Demonstrates how to chain Stream methods.