From 6bef440ef83b18a414a3c3839776c0afc3b15f85 Mon Sep 17 00:00:00 2001 From: Marco de Wild Date: Mon, 22 Oct 2018 09:35:54 +0200 Subject: Java-specifieke uitleg over profiling in de repository gezet --- src/main/java/nl/sogyo/javaopdrachten/profiling/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/nl/sogyo/javaopdrachten/profiling/README.md diff --git a/src/main/java/nl/sogyo/javaopdrachten/profiling/README.md b/src/main/java/nl/sogyo/javaopdrachten/profiling/README.md new file mode 100644 index 0000000..5d213db --- /dev/null +++ b/src/main/java/nl/sogyo/javaopdrachten/profiling/README.md @@ -0,0 +1,9 @@ +h1. Profiling + +The assignments for profiling (A and B in the intermediate track) are on the academy website. This readme contains a few hints to start searching. + +The general documentation is at https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html. + +Java uses `Streams` to allow lazy evaluation. You can chain operations on a stream without evaluating the result. All applied operations are evaluated element-wise when the stream is iterated (consumed). An operation on a stream is given by a function call on the stream that tells the stream what to do with each element (e.g. `filter` or `map`). The input for those functions is another function that meets the required interface. For example `filter` requires a function that accepts an element from the stream and returns a `boolean`. This interface is called a `Predicate`, where `T` is the element type of the stream. + +For assignment 1, you will need a `Predicate`. Assignment 2 focusses on `Function`. You might want to read about `Consumer`s for assignment 3. For assignments 4 and 5, you are on your own. \ No newline at end of file -- cgit v1.2.3