-
Notifications
You must be signed in to change notification settings - Fork 0
/
java8stuff.html
273 lines (252 loc) · 6.22 KB
/
java8stuff.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!doctype html>
<html lang="en">
<head>
<title></title>
<!-- 2017-05-04 Thu 11:14 -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="Org-mode">
<meta name="author" content="jayshah">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
<style type="text/css">
/* org mode styles on top of twbs */
html {
position: relative;
min-height: 100%;
}
body {
font-size: 18px;
margin-bottom: 105px;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 101px;
background-color: #f5f5f5;
}
footer > div {
padding: 10px;
}
footer p {
margin: 0 0 5px;
text-align: center;
font-size: 16px;
}
#table-of-contents {
margin-top: 20px;
margin-bottom: 20px;
}
blockquote p {
font-size: 18px;
}
pre {
font-size: 16px;
}
.footpara {
display: inline-block;
}
figcaption {
font-size: 16px;
color: #666;
font-style: italic;
padding-bottom: 15px;
}
/* from twbs docs */
.bs-docs-sidebar.affix {
position: static;
}
@media (min-width: 768px) {
.bs-docs-sidebar {
padding-left: 20px;
}
}
/* All levels of nav */
.bs-docs-sidebar .nav > li > a {
display: block;
padding: 4px 20px;
font-size: 14px;
font-weight: 500;
color: #999;
}
.bs-docs-sidebar .nav > li > a:hover,
.bs-docs-sidebar .nav > li > a:focus {
padding-left: 19px;
color: #A1283B;
text-decoration: none;
background-color: transparent;
border-left: 1px solid #A1283B;
}
.bs-docs-sidebar .nav > .active > a,
.bs-docs-sidebar .nav > .active:hover > a,
.bs-docs-sidebar .nav > .active:focus > a {
padding-left: 18px;
font-weight: bold;
color: #A1283B;
background-color: transparent;
border-left: 2px solid #A1283B;
}
/* Nav: second level (shown on .active) */
.bs-docs-sidebar .nav .nav {
display: none; /* Hide by default, but at >768px, show it */
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
font-size: 12px;
font-weight: normal;
}
.bs-docs-sidebar .nav .nav > li > a:hover,
.bs-docs-sidebar .nav .nav > li > a:focus {
padding-left: 29px;
}
.bs-docs-sidebar .nav .nav > .active > a,
.bs-docs-sidebar .nav .nav > .active:hover > a,
.bs-docs-sidebar .nav .nav > .active:focus > a {
padding-left: 28px;
font-weight: 500;
}
/* Nav: third level (shown on .active) */
.bs-docs-sidebar .nav .nav .nav {
padding-bottom: 10px;
}
.bs-docs-sidebar .nav .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 40px;
font-size: 12px;
font-weight: normal;
}
.bs-docs-sidebar .nav .nav .nav > li > a:hover,
.bs-docs-sidebar .nav .nav .nav > li > a:focus {
padding-left: 39px;
}
.bs-docs-sidebar .nav .nav .nav > .active > a,
.bs-docs-sidebar .nav .nav .nav > .active:hover > a,
.bs-docs-sidebar .nav .nav .nav > .active:focus > a {
padding-left: 38px;
font-weight: 500;
}
/* Show and affix the side nav when space allows it */
@media (min-width: 992px) {
.bs-docs-sidebar .nav > .active > ul {
display: block;
}
/* Widen the fixed sidebar */
.bs-docs-sidebar.affix,
.bs-docs-sidebar.affix-bottom {
width: 213px;
}
.bs-docs-sidebar.affix {
position: fixed; /* Undo the static from mobile first approach */
top: 20px;
}
.bs-docs-sidebar.affix-bottom {
position: absolute; /* Undo the static from mobile first approach */
}
.bs-docs-sidebar.affix .bs-docs-sidenav,.bs-docs-sidebar.affix-bottom .bs-docs-sidenav {
margin-top: 0;
margin-bottom: 0
}
}
@media (min-width: 1200px) {
/* Widen the fixed sidebar again */
.bs-docs-sidebar.affix-bottom,
.bs-docs-sidebar.affix {
width: 263px;
}
}
</style>
<script type="text/javascript">
$(function() {
'use strict';
$('.bs-docs-sidebar li').first().addClass('active');
$(document.body).scrollspy({target: '.bs-docs-sidebar'});
$('.bs-docs-sidebar').affix();
});
</script>
</head>
<body>
<div id="content" class="container">
<div class="row"><div class="col-md-9"><h1 class="title"></h1>
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Stream operations</h2>
<div class="outline-text-2" id="text-1">
</div><div id="outline-container-sec-1-1" class="outline-3">
<h3 id="sec-1-1"><span class="section-number-3">1.1</span> Intermediate operations:</h3>
<div class="outline-text-3" id="text-1-1">
<p>
These operations take a stream and return a stream.
These operations do not get executed until a terminal
operation is invoked. Examples are
</p>
<ul class="org-ul">
<li>filter
</li>
<li>map
</li>
<li>flatmap
</li>
<li>peek (useful for debugging)
</li>
<li>distinct
</li>
<li>sorted
</li>
<li>limit (same as take)
</li>
</ul>
</div>
</div>
<div id="outline-container-sec-1-2" class="outline-3">
<h3 id="sec-1-2"><span class="section-number-3">1.2</span> Terminal operations:</h3>
<div class="outline-text-3" id="text-1-2">
<p>
Terminal operations produces a non-stream, result
such as a primitive value, a collection or no value
at all.
</p>
<ul class="org-ul">
<li>forEach
</li>
<li>toArray
</li>
<li>reduce
</li>
<li>collect
</li>
<li>min, max, count
</li>
<li>anyMatch, allMatch, noneMatch
</li>
<li>findFirst, findAny
</li>
</ul>
</div>
</div>
</div>
</div><div class="col-md-3"><nav id="table-of-contents">
<div id="text-table-of-contents" class="bs-docs-sidebar">
<ul class="nav">
<li><a href="#sec-1">1. Stream operations</a>
<ul class="nav">
<li><a href="#sec-1-1">1.1. Intermediate operations:</a></li>
<li><a href="#sec-1-2">1.2. Terminal operations:</a></li>
</ul>
</li>
</ul>
</div>
</nav>
</div></div></div>
<footer id="postamble" class="">
<div><p class="author">Author: jayshah</p>
<p class="date">Created: 2017-05-04 Thu 11:14</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.5.1 (<a href="http://orgmode.org">Org-mode</a> 9.0.4)</p>
</div>
</footer>
</body>
</html>