common: Add a new StreamUtils class
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Tue, 15 Mar 2016 23:46:45 +0000 (19:46 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 30 Mar 2016 00:27:45 +0000 (20:27 -0400)
commit648903b9bc22bcb9fdf9bf6484d7c868f2ecc7e0
treec133e8e1197da88865e411c382b6a097666d2200
parent6070a6bcc41bea2f6938ef7815f0a37390788a47
common: Add a new StreamUtils class

We often use Iterable in our APIs, due its minimal behavior
exposition. Unfortunately, there is no Iterable.stream() method,
the official way is done using StreamSupport and the corresponding
spliterator.

Since this is a very commonly used pattern, we can introduce a
small utility method that will make it less verbose.

At the same time, we can move the StreamFlattener into the new
utils class.

Change-Id: Ia4fed4f8a5da56f08ac133eb10efae970004e511
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/68563
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
common/org.eclipse.tracecompass.common.core.tests/src/org/eclipse/tracecompass/common/core/tests/StreamFlattenerTest.java [new file with mode: 0644]
common/org.eclipse.tracecompass.common.core.tests/src/org/eclipse/tracecompass/common/core/tests/collect/StreamFlattenerTest.java [deleted file]
common/org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/StreamUtils.java [new file with mode: 0644]
common/org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/collect/StreamFlattener.java [deleted file]
This page took 0.026395 seconds and 5 git commands to generate.