Skip to content

Home

Introduction

Development

IDEs

Services

Service manager

API Explorer

examples package: Using StreamMethods in Gloop

The StreamMethods one-liner class has been exposed so that you can still take advantage of the Java Streams API in Gloop. The 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 package to see the example Gloop services in action. For your benefit, these services are documented via comments.

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.