mirror of https://github.com/deavmi/JavaOCP
Compare commits
2 Commits
e188f4cb58
...
cc4b84354f
Author | SHA1 | Date |
---|---|---|
Tristan B. Velloza Kildaire | cc4b84354f | |
Tristan B. Velloza Kildaire | af336201a5 |
|
@ -15,14 +15,14 @@ public class App
|
|||
public static void main(String[] args)
|
||||
{
|
||||
/**
|
||||
* The <code>Executor</code> provides us with a
|
||||
* The {@link Executor} provides us with a
|
||||
* task executing engine which let's us submit
|
||||
* tasks to it and manage them so forth.
|
||||
*
|
||||
* The <code>ExecutorService</code> is a more
|
||||
* The {@link ExecutorService} is a more
|
||||
* managed version of the above including
|
||||
* scheduling queues, the ability to submit tasks
|
||||
* and obtain a <code>Future</code> for them
|
||||
* and obtain a {@link Future} for them
|
||||
* (of which can be awaited upon once the task
|
||||
* completes).
|
||||
*/
|
||||
|
@ -88,7 +88,7 @@ public class App
|
|||
* Shutdown the executor
|
||||
*/
|
||||
executor.shutdown();
|
||||
|
||||
|
||||
/**
|
||||
* We then will await termination of all jobs
|
||||
* and throw an exception if we time out after
|
||||
|
|
|
@ -51,7 +51,6 @@ public class App
|
|||
names.add("Fransisca");
|
||||
names.add("Gabriella");
|
||||
|
||||
|
||||
/**
|
||||
* We get `Stream<String>` which has various operations
|
||||
* on it which we can use, it streams an element
|
||||
|
@ -195,7 +194,7 @@ public class App
|
|||
return name.length() == 4 ||
|
||||
name.length() == 5;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* We use a <code>Collector</code> as a way
|
||||
* to, well, collect the items produced
|
||||
|
|
|
@ -6,7 +6,7 @@ package ocp.streams.Streams;
|
|||
* to take a number in, transform it
|
||||
* and spit a new number out
|
||||
*/
|
||||
@FunctionalInterface
|
||||
//@FunctionalInterface
|
||||
public interface IntTransform
|
||||
{
|
||||
public int transform(int in);
|
||||
|
|
Loading…
Reference in New Issue