Java 8 - add property of object to list : <p>I have an empty list of integers:</p>

<pre><code>final List&lt;Integer&gt; reservedMarkers = new ArrayList&lt;&gt;();
</code></pre>

<p>and I will fill this list with the marker property of a list of objects, such like this:</p>

<pre><code>scheduleIntervalContainers.stream().forEach(s -&gt; s.getMarker(), reservedMarkers.add(s));
</code></pre>

<p>My final target would be to get the highest marker number but actually I dont know a better way as getting all marker numbers, than sort it and than get the highest one.</p>

<p>this does not work for sure, is there a possibility to do this in this way?</p>
