#12 eugene-papko (c) Lambdas

Open
eugene-papko wants to merge 1 commits from eugene-papko/ZCW-Lambdas:master into master

BIN
.DS_Store View File


+ 1
- 0
.idea/.name View File

@@ -0,0 +1 @@
1
+LambdasLab

+ 13
- 0
.idea/compiler.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <annotationProcessing>
5
+      <profile name="Maven default annotation processors profile" enabled="true">
6
+        <sourceOutputDir name="target/generated-sources/annotations" />
7
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
8
+        <outputRelativeToContentRoot value="true" />
9
+        <module name="ZCW-Lambdas" />
10
+      </profile>
11
+    </annotationProcessing>
12
+  </component>
13
+</project>

+ 14
- 0
.idea/misc.xml View File

@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
4
+  <component name="MavenProjectsManager">
5
+    <option name="originalFiles">
6
+      <list>
7
+        <option value="$PROJECT_DIR$/pom.xml" />
8
+      </list>
9
+    </option>
10
+  </component>
11
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
12
+    <output url="file://$PROJECT_DIR$/out" />
13
+  </component>
14
+</project>

+ 6
- 0
.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="" vcs="Git" />
5
+  </component>
6
+</project>

+ 531
- 0
.idea/workspace.xml View File

@@ -0,0 +1,531 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="8812c5f1-0a26-4aed-b2ff-e94b064d63fd" name="Default" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/src/main/java/Person.java" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/src/test/java/TestPerson.java" afterDir="false" />
9
+    </list>
10
+    <ignored path="$PROJECT_DIR$/out/" />
11
+    <ignored path="$PROJECT_DIR$/target/" />
12
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
+    <option name="TRACKING_ENABLED" value="true" />
14
+    <option name="SHOW_DIALOG" value="false" />
15
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
16
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
17
+    <option name="LAST_RESOLUTION" value="IGNORE" />
18
+  </component>
19
+  <component name="FileEditorManager">
20
+    <leaf>
21
+      <file leaf-file-name="Person.java" pinned="false" current-in-tab="true">
22
+        <entry file="file://$PROJECT_DIR$/src/main/java/Person.java">
23
+          <provider selected="true" editor-type-id="text-editor">
24
+            <state relative-caret-position="538">
25
+              <caret line="96" lean-forward="true" selection-start-line="96" selection-end-line="96" />
26
+              <folding>
27
+                <element signature="imports" expanded="true" />
28
+                <element signature="e#1929#1930#0" expanded="true" />
29
+                <element signature="e#1975#1976#0" expanded="true" />
30
+              </folding>
31
+            </state>
32
+          </provider>
33
+        </entry>
34
+      </file>
35
+    </leaf>
36
+  </component>
37
+  <component name="FileTemplateManagerImpl">
38
+    <option name="RECENT_TEMPLATES">
39
+      <list>
40
+        <option value="Class" />
41
+      </list>
42
+    </option>
43
+  </component>
44
+  <component name="FindInProjectRecents">
45
+    <findStrings>
46
+      <find>age</find>
47
+    </findStrings>
48
+  </component>
49
+  <component name="Git.Settings">
50
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
51
+  </component>
52
+  <component name="IdeDocumentHistory">
53
+    <option name="CHANGED_PATHS">
54
+      <list>
55
+        <option value="$PROJECT_DIR$/pom.xml" />
56
+        <option value="$PROJECT_DIR$/src/test/java/TestPerson.java" />
57
+        <option value="$PROJECT_DIR$/src/main/java/Person.java" />
58
+      </list>
59
+    </option>
60
+  </component>
61
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
62
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
63
+  <component name="JsGulpfileManager">
64
+    <detection-done>true</detection-done>
65
+    <sorting>DEFINITION_ORDER</sorting>
66
+  </component>
67
+  <component name="MavenImportPreferences">
68
+    <option name="importingSettings">
69
+      <MavenImportingSettings>
70
+        <option name="importAutomatically" value="true" />
71
+      </MavenImportingSettings>
72
+    </option>
73
+  </component>
74
+  <component name="NodePackageJsonFileManager">
75
+    <packageJsonPaths />
76
+  </component>
77
+  <component name="ProjectFrameBounds">
78
+    <option name="x" value="190" />
79
+    <option name="y" value="-931" />
80
+    <option name="width" value="1440" />
81
+    <option name="height" value="805" />
82
+  </component>
83
+  <component name="ProjectLevelVcsManager">
84
+    <ConfirmationsSetting value="2" id="Add" />
85
+  </component>
86
+  <component name="ProjectView">
87
+    <navigator proportions="" version="1">
88
+      <foldersAlwaysOnTop value="true" />
89
+    </navigator>
90
+    <panes>
91
+      <pane id="Scope" />
92
+      <pane id="PackagesPane" />
93
+      <pane id="AndroidView" />
94
+      <pane id="ProjectPane">
95
+        <subPane>
96
+          <expand>
97
+            <path>
98
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
99
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
100
+            </path>
101
+            <path>
102
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
103
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
104
+              <item name="src" type="462c0819:PsiDirectoryNode" />
105
+            </path>
106
+            <path>
107
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
108
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
109
+              <item name="src" type="462c0819:PsiDirectoryNode" />
110
+              <item name="main" type="462c0819:PsiDirectoryNode" />
111
+            </path>
112
+            <path>
113
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
114
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
115
+              <item name="src" type="462c0819:PsiDirectoryNode" />
116
+              <item name="main" type="462c0819:PsiDirectoryNode" />
117
+              <item name="java" type="462c0819:PsiDirectoryNode" />
118
+            </path>
119
+            <path>
120
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
121
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
122
+              <item name="src" type="462c0819:PsiDirectoryNode" />
123
+              <item name="test" type="462c0819:PsiDirectoryNode" />
124
+            </path>
125
+            <path>
126
+              <item name="LambdasLab" type="b2602c69:ProjectViewProjectNode" />
127
+              <item name="ZCW-Lambdas" type="462c0819:PsiDirectoryNode" />
128
+              <item name="src" type="462c0819:PsiDirectoryNode" />
129
+              <item name="test" type="462c0819:PsiDirectoryNode" />
130
+              <item name="java" type="462c0819:PsiDirectoryNode" />
131
+            </path>
132
+          </expand>
133
+          <select />
134
+        </subPane>
135
+      </pane>
136
+    </panes>
137
+  </component>
138
+  <component name="PropertiesComponent">
139
+    <property name="WebServerToolWindowFactoryState" value="false" />
140
+    <property name="aspect.path.notification.shown" value="true" />
141
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
142
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
143
+    <property name="project.structure.last.edited" value="Modules" />
144
+    <property name="project.structure.proportion" value="0.15" />
145
+    <property name="project.structure.side.proportion" value="0.2" />
146
+  </component>
147
+  <component name="RunDashboard">
148
+    <option name="ruleStates">
149
+      <list>
150
+        <RuleState>
151
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
152
+        </RuleState>
153
+        <RuleState>
154
+          <option name="name" value="StatusDashboardGroupingRule" />
155
+        </RuleState>
156
+      </list>
157
+    </option>
158
+  </component>
159
+  <component name="RunManager" selected="JUnit.TestPerson">
160
+    <configuration default="true" type="Application" factoryName="Application">
161
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
162
+    </configuration>
163
+    <configuration name="TestPerson" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
164
+      <module name="ZCW-Lambdas" />
165
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
166
+      <option name="ALTERNATIVE_JRE_PATH" />
167
+      <option name="PACKAGE_NAME" value="" />
168
+      <option name="MAIN_CLASS_NAME" value="TestPerson" />
169
+      <option name="METHOD_NAME" />
170
+      <option name="TEST_OBJECT" value="class" />
171
+      <option name="VM_PARAMETERS" value="-ea" />
172
+      <option name="PARAMETERS" />
173
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
174
+      <option name="PASS_PARENT_ENVS" value="true" />
175
+      <option name="TEST_SEARCH_SCOPE">
176
+        <value defaultName="singleModule" />
177
+      </option>
178
+      <patterns />
179
+    </configuration>
180
+    <configuration name="TestPerson.testAnonymousClass" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
181
+      <module name="ZCW-Lambdas" />
182
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
183
+      <option name="ALTERNATIVE_JRE_PATH" />
184
+      <option name="PACKAGE_NAME" value="" />
185
+      <option name="MAIN_CLASS_NAME" value="TestPerson" />
186
+      <option name="METHOD_NAME" value="testAnonymousClass" />
187
+      <option name="TEST_OBJECT" value="method" />
188
+      <option name="VM_PARAMETERS" value="-ea" />
189
+      <option name="PARAMETERS" />
190
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
191
+      <option name="PASS_PARENT_ENVS" value="true" />
192
+      <option name="TEST_SEARCH_SCOPE">
193
+        <value defaultName="singleModule" />
194
+      </option>
195
+      <patterns />
196
+    </configuration>
197
+    <configuration name="TestPerson.testGetAge" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
198
+      <module name="ZCW-Lambdas" />
199
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
200
+      <option name="ALTERNATIVE_JRE_PATH" />
201
+      <option name="PACKAGE_NAME" value="" />
202
+      <option name="MAIN_CLASS_NAME" value="TestPerson" />
203
+      <option name="METHOD_NAME" value="testGetAge" />
204
+      <option name="TEST_OBJECT" value="method" />
205
+      <option name="VM_PARAMETERS" value="-ea" />
206
+      <option name="PARAMETERS" />
207
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
208
+      <option name="PASS_PARENT_ENVS" value="true" />
209
+      <option name="TEST_SEARCH_SCOPE">
210
+        <value defaultName="singleModule" />
211
+      </option>
212
+      <patterns />
213
+    </configuration>
214
+    <configuration name="TestPerson.testLocalClass" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
215
+      <module name="ZCW-Lambdas" />
216
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
217
+      <option name="ALTERNATIVE_JRE_PATH" />
218
+      <option name="PACKAGE_NAME" value="" />
219
+      <option name="MAIN_CLASS_NAME" value="TestPerson" />
220
+      <option name="METHOD_NAME" value="testLocalClass" />
221
+      <option name="TEST_OBJECT" value="method" />
222
+      <option name="VM_PARAMETERS" value="-ea" />
223
+      <option name="PARAMETERS" />
224
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
225
+      <option name="PASS_PARENT_ENVS" value="true" />
226
+      <option name="TEST_SEARCH_SCOPE">
227
+        <value defaultName="singleModule" />
228
+      </option>
229
+      <patterns />
230
+    </configuration>
231
+    <configuration name="TestPerson.testPrint" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
232
+      <module name="ZCW-Lambdas" />
233
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
234
+      <option name="ALTERNATIVE_JRE_PATH" />
235
+      <option name="PACKAGE_NAME" value="" />
236
+      <option name="MAIN_CLASS_NAME" value="TestPerson" />
237
+      <option name="METHOD_NAME" value="testPrint" />
238
+      <option name="TEST_OBJECT" value="method" />
239
+      <option name="VM_PARAMETERS" value="-ea" />
240
+      <option name="PARAMETERS" />
241
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
242
+      <option name="PASS_PARENT_ENVS" value="true" />
243
+      <option name="TEST_SEARCH_SCOPE">
244
+        <value defaultName="singleModule" />
245
+      </option>
246
+      <patterns />
247
+    </configuration>
248
+    <configuration default="true" type="JUnit" factoryName="JUnit">
249
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
250
+      <option name="ALTERNATIVE_JRE_PATH" />
251
+      <option name="PACKAGE_NAME" />
252
+      <option name="MAIN_CLASS_NAME" />
253
+      <option name="METHOD_NAME" />
254
+      <option name="TEST_OBJECT" value="class" />
255
+      <option name="VM_PARAMETERS" value="-ea" />
256
+      <option name="PARAMETERS" />
257
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
258
+      <option name="PASS_PARENT_ENVS" value="true" />
259
+      <option name="TEST_SEARCH_SCOPE">
260
+        <value defaultName="singleModule" />
261
+      </option>
262
+      <patterns />
263
+    </configuration>
264
+    <configuration default="true" type="TestNG" factoryName="TestNG">
265
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
266
+      <option name="ALTERNATIVE_JRE_PATH" />
267
+      <option name="SUITE_NAME" />
268
+      <option name="PACKAGE_NAME" />
269
+      <option name="MAIN_CLASS_NAME" />
270
+      <option name="METHOD_NAME" />
271
+      <option name="GROUP_NAME" />
272
+      <option name="TEST_OBJECT" value="CLASS" />
273
+      <option name="VM_PARAMETERS" value="-ea" />
274
+      <option name="PARAMETERS" />
275
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
276
+      <option name="OUTPUT_DIRECTORY" />
277
+      <option name="PASS_PARENT_ENVS" value="true" />
278
+      <option name="TEST_SEARCH_SCOPE">
279
+        <value defaultName="singleModule" />
280
+      </option>
281
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
282
+      <option name="PROPERTIES_FILE" />
283
+      <properties />
284
+      <listeners />
285
+    </configuration>
286
+    <list>
287
+      <item itemvalue="JUnit.TestPerson.testGetAge" />
288
+      <item itemvalue="JUnit.TestPerson" />
289
+      <item itemvalue="JUnit.TestPerson.testPrint" />
290
+      <item itemvalue="JUnit.TestPerson.testAnonymousClass" />
291
+      <item itemvalue="JUnit.TestPerson.testLocalClass" />
292
+    </list>
293
+    <recent_temporary>
294
+      <list>
295
+        <item itemvalue="JUnit.TestPerson" />
296
+        <item itemvalue="JUnit.TestPerson.testLocalClass" />
297
+        <item itemvalue="JUnit.TestPerson.testAnonymousClass" />
298
+        <item itemvalue="JUnit.TestPerson.testPrint" />
299
+        <item itemvalue="JUnit.TestPerson.testGetAge" />
300
+      </list>
301
+    </recent_temporary>
302
+  </component>
303
+  <component name="SvnConfiguration">
304
+    <configuration />
305
+  </component>
306
+  <component name="TaskManager">
307
+    <task active="true" id="Default" summary="Default task">
308
+      <changelist id="8812c5f1-0a26-4aed-b2ff-e94b064d63fd" name="Default" comment="" />
309
+      <created>1529445320322</created>
310
+      <option name="number" value="Default" />
311
+      <option name="presentableId" value="Default" />
312
+      <updated>1529445320322</updated>
313
+      <workItem from="1529445321857" duration="11601000" />
314
+      <workItem from="1530228124315" duration="275000" />
315
+    </task>
316
+    <servers />
317
+  </component>
318
+  <component name="TestHistory">
319
+    <history-entry file="TestPerson_testGetAge - 2018.06.19 at 18h 26m 29s.xml">
320
+      <configuration name="TestPerson.testGetAge" configurationId="JUnit" />
321
+    </history-entry>
322
+    <history-entry file="TestPerson - 2018.06.19 at 18h 27m 19s.xml">
323
+      <configuration name="TestPerson" configurationId="JUnit" />
324
+    </history-entry>
325
+    <history-entry file="TestPerson - 2018.06.19 at 18h 27m 56s.xml">
326
+      <configuration name="TestPerson" configurationId="JUnit" />
327
+    </history-entry>
328
+    <history-entry file="TestPerson_testGetAge - 2018.06.19 at 18h 29m 50s.xml">
329
+      <configuration name="TestPerson.testGetAge" configurationId="JUnit" />
330
+    </history-entry>
331
+    <history-entry file="TestPerson_testPrint - 2018.06.20 at 10h 26m 20s.xml">
332
+      <configuration name="TestPerson.testPrint" configurationId="JUnit" />
333
+    </history-entry>
334
+    <history-entry file="TestPerson_testPrint - 2018.06.20 at 10h 27m 11s.xml">
335
+      <configuration name="TestPerson.testPrint" configurationId="JUnit" />
336
+    </history-entry>
337
+    <history-entry file="TestPerson_testAnonymousClass - 2018.06.20 at 10h 36m 42s.xml">
338
+      <configuration name="TestPerson.testAnonymousClass" configurationId="JUnit" />
339
+    </history-entry>
340
+    <history-entry file="TestPerson_testLocalClass - 2018.06.20 at 10h 46m 19s.xml">
341
+      <configuration name="TestPerson.testLocalClass" configurationId="JUnit" />
342
+    </history-entry>
343
+    <history-entry file="TestPerson - 2018.06.20 at 10h 58m 34s.xml">
344
+      <configuration name="TestPerson" configurationId="JUnit" />
345
+    </history-entry>
346
+    <history-entry file="TestPerson - 2018.06.20 at 10h 58m 54s.xml">
347
+      <configuration name="TestPerson" configurationId="JUnit" />
348
+    </history-entry>
349
+  </component>
350
+  <component name="TimeTrackingManager">
351
+    <option name="totallyTimeSpent" value="11876000" />
352
+  </component>
353
+  <component name="ToolWindowManager">
354
+    <frame x="190" y="-931" width="1440" height="805" extended-state="0" />
355
+    <editor active="true" />
356
+    <layout>
357
+      <window_info anchor="right" id="Palette" order="3" />
358
+      <window_info anchor="bottom" id="TODO" order="6" />
359
+      <window_info anchor="right" id="Palette&#9;" order="3" />
360
+      <window_info id="Image Layers" order="2" />
361
+      <window_info anchor="right" id="Capture Analysis" order="3" />
362
+      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
363
+      <window_info anchor="right" id="Maven Projects" order="3" />
364
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
365
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32909605" />
366
+      <window_info anchor="bottom" id="Version Control" order="7" />
367
+      <window_info anchor="bottom" id="Terminal" order="7" />
368
+      <window_info id="Capture Tool" order="2" />
369
+      <window_info id="Designer" order="2" />
370
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
371
+      <window_info anchor="right" id="Database" order="3" />
372
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
373
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
374
+      <window_info id="UI Designer" order="2" />
375
+      <window_info anchor="right" id="Theme Preview" order="3" />
376
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
377
+      <window_info id="Favorites" order="2" side_tool="true" />
378
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
379
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
380
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
381
+      <window_info anchor="bottom" id="Message" order="0" />
382
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
383
+      <window_info anchor="bottom" id="Find" order="1" />
384
+      <window_info anchor="bottom" id="Messages" order="7" weight="0.32909605" />
385
+    </layout>
386
+  </component>
387
+  <component name="TypeScriptGeneratedFilesManager">
388
+    <option name="version" value="1" />
389
+  </component>
390
+  <component name="VcsContentAnnotationSettings">
391
+    <option name="myLimit" value="2678400000" />
392
+  </component>
393
+  <component name="XDebuggerManager">
394
+    <breakpoint-manager>
395
+      <option name="time" value="1" />
396
+    </breakpoint-manager>
397
+  </component>
398
+  <component name="editorHistoryManager">
399
+    <entry file="file://$PROJECT_DIR$/pom.xml">
400
+      <provider selected="true" editor-type-id="text-editor">
401
+        <state relative-caret-position="195">
402
+          <caret line="13" column="36" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
403
+        </state>
404
+      </provider>
405
+    </entry>
406
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/src.zip!/java/time/Period.java">
407
+      <provider selected="true" editor-type-id="text-editor">
408
+        <state relative-caret-position="149">
409
+          <caret line="384" column="25" selection-start-line="384" selection-start-column="25" selection-end-line="384" selection-end-column="25" />
410
+        </state>
411
+      </provider>
412
+    </entry>
413
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/src.zip!/java/time/LocalDate.java">
414
+      <provider selected="true" editor-type-id="text-editor">
415
+        <state relative-caret-position="1413">
416
+          <caret line="306" column="37" selection-start-line="306" selection-start-column="37" selection-end-line="306" selection-end-column="37" />
417
+        </state>
418
+      </provider>
419
+    </entry>
420
+    <entry file="file://$PROJECT_DIR$/src/test/java/TestPerson.java">
421
+      <provider selected="true" editor-type-id="text-editor">
422
+        <state relative-caret-position="810">
423
+          <caret line="54" column="39" lean-forward="true" selection-start-line="54" selection-start-column="39" selection-end-line="54" selection-end-column="39" />
424
+          <folding>
425
+            <element signature="imports" expanded="true" />
426
+          </folding>
427
+        </state>
428
+      </provider>
429
+    </entry>
430
+    <entry file="file://$PROJECT_DIR$/src/main/java/Person.java">
431
+      <provider selected="true" editor-type-id="text-editor">
432
+        <state relative-caret-position="538">
433
+          <caret line="96" lean-forward="true" selection-start-line="96" selection-end-line="96" />
434
+          <folding>
435
+            <element signature="imports" expanded="true" />
436
+            <element signature="e#1929#1930#0" expanded="true" />
437
+            <element signature="e#1975#1976#0" expanded="true" />
438
+          </folding>
439
+        </state>
440
+      </provider>
441
+    </entry>
442
+  </component>
443
+  <component name="masterDetails">
444
+    <states>
445
+      <state key="ArtifactsStructureConfigurable.UI">
446
+        <settings>
447
+          <artifact-editor />
448
+          <splitter-proportions>
449
+            <option name="proportions">
450
+              <list>
451
+                <option value="0.2" />
452
+              </list>
453
+            </option>
454
+          </splitter-proportions>
455
+        </settings>
456
+      </state>
457
+      <state key="FacetStructureConfigurable.UI">
458
+        <settings>
459
+          <last-edited>No facets are configured</last-edited>
460
+          <splitter-proportions>
461
+            <option name="proportions">
462
+              <list>
463
+                <option value="0.2" />
464
+              </list>
465
+            </option>
466
+          </splitter-proportions>
467
+        </settings>
468
+      </state>
469
+      <state key="GlobalLibrariesConfigurable.UI">
470
+        <settings>
471
+          <splitter-proportions>
472
+            <option name="proportions">
473
+              <list>
474
+                <option value="0.2" />
475
+              </list>
476
+            </option>
477
+          </splitter-proportions>
478
+        </settings>
479
+      </state>
480
+      <state key="JdkListConfigurable.UI">
481
+        <settings>
482
+          <last-edited>1.8</last-edited>
483
+          <splitter-proportions>
484
+            <option name="proportions">
485
+              <list>
486
+                <option value="0.2" />
487
+              </list>
488
+            </option>
489
+          </splitter-proportions>
490
+        </settings>
491
+      </state>
492
+      <state key="ModuleStructureConfigurable.UI">
493
+        <settings>
494
+          <last-edited>ZCW-Lambdas</last-edited>
495
+          <splitter-proportions>
496
+            <option name="proportions">
497
+              <list>
498
+                <option value="0.2" />
499
+                <option value="0.6" />
500
+              </list>
501
+            </option>
502
+          </splitter-proportions>
503
+        </settings>
504
+      </state>
505
+      <state key="ProjectJDKs.UI">
506
+        <settings>
507
+          <last-edited>1.8</last-edited>
508
+          <splitter-proportions>
509
+            <option name="proportions">
510
+              <list>
511
+                <option value="0.2" />
512
+              </list>
513
+            </option>
514
+          </splitter-proportions>
515
+        </settings>
516
+      </state>
517
+      <state key="ProjectLibrariesConfigurable.UI">
518
+        <settings>
519
+          <last-edited>Maven: org.apiguardian:apiguardian-api:1.0.0</last-edited>
520
+          <splitter-proportions>
521
+            <option name="proportions">
522
+              <list>
523
+                <option value="0.2" />
524
+              </list>
525
+            </option>
526
+          </splitter-proportions>
527
+        </settings>
528
+      </state>
529
+    </states>
530
+  </component>
531
+</project>

+ 2
- 0
ZCW-Lambdas.iml View File

@@ -0,0 +1,2 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4" />

+ 19
- 0
pom.xml View File

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>LabLambdas</groupId>
8
+    <artifactId>LambdasLab</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <dependency>
12
+            <groupId>org.junit.jupiter</groupId>
13
+            <artifactId>junit-jupiter-api</artifactId>
14
+            <version>5.2.0</version>
15
+        </dependency>
16
+    </dependencies>
17
+
18
+
19
+</project>

BIN
src/.DS_Store View File


BIN
src/main/.DS_Store View File


+ 99
- 0
src/main/java/Person.java View File

@@ -0,0 +1,99 @@
1
+import java.time.LocalDate;
2
+import java.time.Period;
3
+import java.util.List;
4
+
5
+public class Person {
6
+
7
+    public enum Sex {
8
+        MALE, FEMALE
9
+    }
10
+
11
+    String name;
12
+    LocalDate birthday;
13
+    Sex gender;
14
+    String emailAddress;
15
+
16
+    public Person(String name, LocalDate birthday, Sex gender, String email) {
17
+        this.name = name;
18
+        this.birthday = birthday;
19
+        this.gender = gender;
20
+        this.emailAddress = email;
21
+    }
22
+
23
+    public String getName() {
24
+        return this.name;
25
+    }
26
+
27
+    public LocalDate getBirthday() {
28
+        return this.birthday;
29
+    }
30
+
31
+    public Sex getGender() {
32
+        return this.gender;
33
+    }
34
+
35
+    public String getEmailAddress() {
36
+        return this.emailAddress;
37
+    }
38
+
39
+    public int getAge() {
40
+        return Period.between(this.birthday, LocalDate.now()).getYears();
41
+    }
42
+
43
+    public void printPerson() {
44
+        System.out.println(String.format("%s %s %s %s", this.name, this.gender, getAge(), this.emailAddress));
45
+    }
46
+
47
+    public static void printPersonsOlderThan(List<Person> roster, int age) {
48
+        for (Person p : roster) {
49
+            if (p.getAge() >= age) {
50
+                p.printPerson();
51
+            }
52
+        }
53
+    }
54
+
55
+    public static void printPersonsWithinAgeRange(
56
+            List<Person> roster, int low, int high) {
57
+        for (Person p : roster) {
58
+            if (low <= p.getAge() && p.getAge() < high) {
59
+                p.printPerson();
60
+            }
61
+        }
62
+    }
63
+
64
+    public static int printPersons(
65
+            List<Person> roster, CheckPerson tester) {
66
+        int counter = 0;
67
+        for (Person p : roster) {
68
+            if (tester.test(p)) {
69
+                p.printPerson();
70
+                counter++;
71
+            }
72
+        }
73
+        return counter;
74
+    }
75
+
76
+    interface CheckPerson {
77
+        boolean test(Person p);
78
+    }
79
+
80
+    /* LOCAL CLASS */
81
+    class PersonChecker implements CheckPerson {
82
+        public boolean test(Person p) {
83
+            return p.getAge() > 15;
84
+        }
85
+    }
86
+
87
+    /* ANONYMOUS CLASS */
88
+    CheckPerson checker = new CheckPerson() {
89
+        @Override
90
+        public boolean test(Person p) {
91
+            return p.getAge() > 15;
92
+        }
93
+    };
94
+
95
+    /* LAMBDA EXPRESSION */
96
+    CheckPerson checkerLambda = (Person p) -> p.getAge() > 15;
97
+
98
+
99
+}

+ 65
- 0
src/test/java/TestPerson.java View File

@@ -0,0 +1,65 @@
1
+import org.junit.jupiter.api.BeforeAll;
2
+import org.junit.jupiter.api.BeforeEach;
3
+import org.junit.jupiter.api.Test;
4
+
5
+import java.time.LocalDate;
6
+import java.util.ArrayList;
7
+import java.util.List;
8
+
9
+import static org.junit.jupiter.api.Assertions.assertEquals;
10
+
11
+public class TestPerson {
12
+
13
+    private List peopleList;
14
+    private Person prsn1;
15
+
16
+    @BeforeEach
17
+    public void initialize() {
18
+        prsn1 = new Person("John", LocalDate.of(1989, 6, 15), Person.Sex.MALE, "john@google.com");
19
+        Person prsn2 = new Person("Melissa", LocalDate.of(1989, 3, 15), Person.Sex.FEMALE, "melissa@google.com");
20
+        Person prsn3 = new Person("Ray", LocalDate.of(2009, 3, 15), Person.Sex.MALE, "ray@google.com");
21
+        peopleList = new ArrayList();
22
+        peopleList.add(prsn1);
23
+        peopleList.add(prsn2);
24
+        peopleList.add(prsn3);
25
+    }
26
+
27
+    @Test
28
+    public void testGetAge() {
29
+        Person prsn = new Person("John", LocalDate.of(1989, 11, 15), Person.Sex.MALE, "john@google.com");
30
+        int expected = 28;
31
+        int actual = prsn.getAge();
32
+        assertEquals(expected, actual);
33
+    }
34
+
35
+    @Test
36
+    public void testGetAge2() {
37
+        Person prsn = new Person("John", LocalDate.of(1989, 3, 15), Person.Sex.MALE, "john@google.com");
38
+        int expected = 29;
39
+        int actual = prsn.getAge();
40
+        assertEquals(expected, actual);
41
+    }
42
+
43
+    @Test
44
+    public void testLambda() {
45
+
46
+        int expected = 2;
47
+        int actual = Person.printPersons(peopleList, prsn1.checkerLambda);
48
+        assertEquals(expected, actual);
49
+    }
50
+
51
+    @Test
52
+    public void testAnonymousClass() {
53
+        int expected = 2;
54
+        int actual = Person.printPersons(peopleList, prsn1.checker);
55
+        assertEquals(expected, actual);
56
+    }
57
+
58
+    @Test
59
+    public void testLocalClass() {
60
+        int expected = 2;
61
+        Person.PersonChecker pc = prsn1.new PersonChecker();
62
+        int actual = Person.printPersons(peopleList, pc);
63
+        assertEquals(expected, actual);
64
+    }
65
+}

BIN
target/classes/Person$1.class View File


BIN
target/classes/Person$CheckPerson.class View File


BIN
target/classes/Person$PersonChecker.class View File


BIN
target/classes/Person$Sex.class View File


BIN
target/classes/Person.class View File


BIN
target/test-classes/TestPerson.class View File