Browse Source

changes to source file

pchai7 5 years ago
parent
commit
7a8ff9548b
100 changed files with 84166 additions and 1629 deletions
  1. BIN
      .DS_Store
  2. 0
    0
      .gitignore
  3. 1
    0
      .idea/.name
  4. 2
    2
      .idea/compiler.xml
  5. 0
    7
      .idea/kotlinc.xml
  6. 0
    13
      .idea/libraries/Maven__junit_junit_4_12.xml
  7. 13
    0
      .idea/libraries/Maven__junit_junit_4_13_beta_1.xml
  8. 0
    0
      .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml
  9. 3
    34
      .idea/misc.xml
  10. 1
    1
      .idea/modules.xml
  11. 0
    124
      .idea/uiDesigner.xml
  12. 0
    0
      .idea/vcs.xml
  13. 163
    1426
      .idea/workspace.xml
  14. 1
    0
      README.md
  15. 16
    0
      looptest.iml
  16. 20
    0
      pom.xml
  17. BIN
      src/.DS_Store
  18. BIN
      src/main/.DS_Store
  19. BIN
      src/main/java/.DS_Store
  20. BIN
      src/main/java/com/.DS_Store
  21. BIN
      src/main/java/com/zipcodewilmington/.DS_Store
  22. BIN
      src/main/java/com/zipcodewilmington/streams/.DS_Store
  23. 7
    4
      src/main/java/com/zipcodewilmington/streams/StreamFilter.java
  24. 0
    0
      src/main/java/com/zipcodewilmington/streams/StreamMap.java
  25. 0
    0
      src/main/java/com/zipcodewilmington/streams/anthropoid/Person.java
  26. 6
    3
      src/main/java/com/zipcodewilmington/streams/anthropoid/PersonFactory.java
  27. 8
    7
      src/main/java/com/zipcodewilmington/streams/anthropoid/PersonWarehouse.java
  28. 3
    2
      src/main/java/com/zipcodewilmington/streams/conversions/ArrayConverter.java
  29. 0
    0
      src/main/java/com/zipcodewilmington/streams/conversions/ConversionAgent.java
  30. 0
    0
      src/main/java/com/zipcodewilmington/streams/conversions/ListConverter.java
  31. 0
    0
      src/main/java/com/zipcodewilmington/streams/conversions/PersonConversionAgent.java
  32. 0
    0
      src/main/java/com/zipcodewilmington/streams/conversions/StreamConverter.java
  33. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/DateUtils.java
  34. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/RandomUtils.java
  35. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/ReflectionUtils.java
  36. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/StringUtils.java
  37. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/logging/LoggerHandler.java
  38. 0
    0
      src/main/java/com/zipcodewilmington/streams/tools/logging/LoggerWarehouse.java
  39. 0
    0
      src/test/java/com/zipcodewilmington/streams/TestConstants.java
  40. 0
    0
      src/test/java/com/zipcodewilmington/streams/TestStreamFilter.java
  41. 0
    0
      src/test/java/com/zipcodewilmington/streams/TestSuiteFullRegression.java
  42. 0
    0
      src/test/java/com/zipcodewilmington/streams/anthropoid/TestPerson.java
  43. 0
    0
      src/test/java/com/zipcodewilmington/streams/anthropoid/TestPersonFactory.java
  44. 0
    0
      src/test/java/com/zipcodewilmington/streams/anthropoid/TestPersonWarehouse.java
  45. 0
    0
      src/test/java/com/zipcodewilmington/streams/anthropoid/TestSuiteAnthropoidRegression.java
  46. 0
    0
      src/test/java/com/zipcodewilmington/streams/conversions/TestConversionAgent.java
  47. 0
    0
      src/test/java/com/zipcodewilmington/streams/conversions/TestConverterArray.java
  48. 0
    0
      src/test/java/com/zipcodewilmington/streams/conversions/TestConverterList.java
  49. 0
    0
      src/test/java/com/zipcodewilmington/streams/conversions/TestConverterStream.java
  50. 0
    0
      src/test/java/com/zipcodewilmington/streams/conversions/TestSuiteConversionRegression.java
  51. 0
    0
      streamdemo.iml
  52. 83922
    6
      target/PersonWarehouse.leonlog
  53. 0
    0
      target/allclasses-frame.html
  54. 0
    0
      target/allclasses-noframe.html
  55. BIN
      target/classes/com/zipcodewilmington/streams/StreamFilter.class
  56. 0
    0
      target/classes/com/zipcodewilmington/streams/StreamMap.class
  57. 0
    0
      target/classes/com/zipcodewilmington/streams/anthropoid/Person.class
  58. BIN
      target/classes/com/zipcodewilmington/streams/anthropoid/PersonFactory.class
  59. BIN
      target/classes/com/zipcodewilmington/streams/anthropoid/PersonWarehouse.class
  60. BIN
      target/classes/com/zipcodewilmington/streams/conversions/ArrayConverter.class
  61. 0
    0
      target/classes/com/zipcodewilmington/streams/conversions/ConversionAgent.class
  62. 0
    0
      target/classes/com/zipcodewilmington/streams/conversions/ListConverter.class
  63. 0
    0
      target/classes/com/zipcodewilmington/streams/conversions/PersonConversionAgent.class
  64. 0
    0
      target/classes/com/zipcodewilmington/streams/conversions/StreamConverter.class
  65. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/DateUtils.class
  66. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/RandomUtils.class
  67. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/ReflectionUtils$1.class
  68. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/ReflectionUtils.class
  69. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/StringUtils.class
  70. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/logging/LoggerHandler.class
  71. 0
    0
      target/classes/com/zipcodewilmington/streams/tools/logging/LoggerWarehouse.class
  72. 0
    0
      target/com/zipcodewilmington/streams/StreamFilter.html
  73. 0
    0
      target/com/zipcodewilmington/streams/StreamMap.html
  74. 0
    0
      target/com/zipcodewilmington/streams/TestConstants.html
  75. 0
    0
      target/com/zipcodewilmington/streams/TestStreamFilter.html
  76. 0
    0
      target/com/zipcodewilmington/streams/TestStreamMap.html
  77. 0
    0
      target/com/zipcodewilmington/streams/TestSuiteFullRegression.html
  78. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/Person.PersonProperty.html
  79. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/Person.html
  80. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/PersonFactory.html
  81. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/TestPerson.html
  82. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/TestPersonFactory.html
  83. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/package-frame.html
  84. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/package-summary.html
  85. 0
    0
      target/com/zipcodewilmington/streams/anthropoid/package-tree.html
  86. 0
    0
      target/com/zipcodewilmington/streams/conversions/ArrayConverter.html
  87. 0
    0
      target/com/zipcodewilmington/streams/conversions/ConversionAgent.html
  88. 0
    0
      target/com/zipcodewilmington/streams/conversions/ListConverter.html
  89. 0
    0
      target/com/zipcodewilmington/streams/conversions/StreamConverter.html
  90. 0
    0
      target/com/zipcodewilmington/streams/conversions/TestConversionAgent.html
  91. 0
    0
      target/com/zipcodewilmington/streams/conversions/TestConverterArray.html
  92. 0
    0
      target/com/zipcodewilmington/streams/conversions/TestConverterList.html
  93. 0
    0
      target/com/zipcodewilmington/streams/conversions/TestConverterStream.html
  94. 0
    0
      target/com/zipcodewilmington/streams/conversions/TestSuiteConversionRegression.html
  95. 0
    0
      target/com/zipcodewilmington/streams/conversions/package-frame.html
  96. 0
    0
      target/com/zipcodewilmington/streams/conversions/package-summary.html
  97. 0
    0
      target/com/zipcodewilmington/streams/conversions/package-tree.html
  98. 0
    0
      target/com/zipcodewilmington/streams/exercises/ArrayConverter.html
  99. 0
    0
      target/com/zipcodewilmington/streams/exercises/ConversionAgent.html
  100. 0
    0
      target/com/zipcodewilmington/streams/exercises/ListConverter.html

BIN
.DS_Store View File


+ 0
- 0
.gitignore View File


+ 1
- 0
.idea/.name View File

@@ -0,0 +1 @@
1
+looptest

+ 2
- 2
.idea/compiler.xml View File

@@ -9,8 +9,8 @@
9 9
         <module name="looptest" />
10 10
       </profile>
11 11
     </annotationProcessing>
12
-    <bytecodeTargetLevel target="1.8">
13
-      <module name="looptest" target="1.8" />
12
+    <bytecodeTargetLevel>
13
+      <module name="looptest" target="8" />
14 14
     </bytecodeTargetLevel>
15 15
   </component>
16 16
 </project>

+ 0
- 7
.idea/kotlinc.xml View File

@@ -1,7 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="KotlinCommonCompilerArguments">
4
-    <option name="languageVersion" value="1.1" />
5
-    <option name="apiVersion" value="1.1" />
6
-  </component>
7
-</project>

+ 0
- 13
.idea/libraries/Maven__junit_junit_4_12.xml View File

@@ -1,13 +0,0 @@
1
-<component name="libraryTable">
2
-  <library name="Maven: junit:junit:4.12">
3
-    <CLASSES>
4
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
5
-    </CLASSES>
6
-    <JAVADOC>
7
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
8
-    </JAVADOC>
9
-    <SOURCES>
10
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
11
-    </SOURCES>
12
-  </library>
13
-</component>

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_13_beta_1.xml View File

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.13-beta-1">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13-beta-1/junit-4.13-beta-1.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13-beta-1/junit-4.13-beta-1-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.13-beta-1/junit-4.13-beta-1-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 0
- 0
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml View File


+ 3
- 34
.idea/misc.xml View File

@@ -1,23 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3
-  <component name="JavadocGenerationManager">
4
-    <option name="OUTPUT_DIRECTORY" value="$PROJECT_DIR$/target" />
5
-    <option name="OPTION_SCOPE" value="protected" />
6
-    <option name="OPTION_HIERARCHY" value="true" />
7
-    <option name="OPTION_NAVIGATOR" value="true" />
8
-    <option name="OPTION_INDEX" value="true" />
9
-    <option name="OPTION_SEPARATE_INDEX" value="true" />
10
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
11
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
12
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
13
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
14
-    <option name="OPTION_DEPRECATED_LIST" value="true" />
15
-    <option name="OTHER_OPTIONS" />
16
-    <option name="HEAP_SIZE" />
17
-    <option name="LOCALE" />
18
-    <option name="OPEN_IN_BROWSER" value="true" />
19
-    <option name="OPTION_INCLUDE_LIBS" value="false" />
20
-  </component>
21 3
   <component name="MavenProjectsManager">
22 4
     <option name="originalFiles">
23 5
       <list>
@@ -25,23 +7,10 @@
25 7
       </list>
26 8
     </option>
27 9
   </component>
28
-  <component name="ProjectInspectionProfilesVisibleTreeState">
29
-    <entry key="Project Default">
30
-      <profile-state>
31
-        <expanded-state>
32
-          <State>
33
-            <id />
34
-          </State>
35
-        </expanded-state>
36
-        <selected-state>
37
-          <State>
38
-            <id>Android</id>
39
-          </State>
40
-        </selected-state>
41
-      </profile-state>
42
-    </entry>
10
+  <component name="ProjectDictionaryState">
11
+    <dictionary name="chaitalipatel" />
43 12
   </component>
44 13
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
45
-    <output url="file://$PROJECT_DIR$/out" />
14
+    <output url="file://$PROJECT_DIR$/classes" />
46 15
   </component>
47 16
 </project>

+ 1
- 1
.idea/modules.xml View File

@@ -2,7 +2,7 @@
2 2
 <project version="4">
3 3
   <component name="ProjectModuleManager">
4 4
     <modules>
5
-      <module fileurl="file://$PROJECT_DIR$/streamdemo.iml" filepath="$PROJECT_DIR$/streamdemo.iml" />
5
+      <module fileurl="file://$PROJECT_DIR$/looptest.iml" filepath="$PROJECT_DIR$/looptest.iml" />
6 6
     </modules>
7 7
   </component>
8 8
 </project>

+ 0
- 124
.idea/uiDesigner.xml View File

@@ -1,124 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project version="4">
3
-  <component name="Palette2">
4
-    <group name="Swing">
5
-      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
6
-        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
7
-      </item>
8
-      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
9
-        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
10
-      </item>
11
-      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
12
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
13
-      </item>
14
-      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
15
-        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
16
-      </item>
17
-      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
18
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
19
-        <initial-values>
20
-          <property name="text" value="Button" />
21
-        </initial-values>
22
-      </item>
23
-      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
24
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
25
-        <initial-values>
26
-          <property name="text" value="RadioButton" />
27
-        </initial-values>
28
-      </item>
29
-      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
30
-        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
31
-        <initial-values>
32
-          <property name="text" value="CheckBox" />
33
-        </initial-values>
34
-      </item>
35
-      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
36
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
37
-        <initial-values>
38
-          <property name="text" value="Label" />
39
-        </initial-values>
40
-      </item>
41
-      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
42
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
43
-          <preferred-size width="150" height="-1" />
44
-        </default-constraints>
45
-      </item>
46
-      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
47
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
48
-          <preferred-size width="150" height="-1" />
49
-        </default-constraints>
50
-      </item>
51
-      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
52
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
53
-          <preferred-size width="150" height="-1" />
54
-        </default-constraints>
55
-      </item>
56
-      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
57
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
58
-          <preferred-size width="150" height="50" />
59
-        </default-constraints>
60
-      </item>
61
-      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
62
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
63
-          <preferred-size width="150" height="50" />
64
-        </default-constraints>
65
-      </item>
66
-      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
67
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
68
-          <preferred-size width="150" height="50" />
69
-        </default-constraints>
70
-      </item>
71
-      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
72
-        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
73
-      </item>
74
-      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
75
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
76
-          <preferred-size width="150" height="50" />
77
-        </default-constraints>
78
-      </item>
79
-      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
80
-        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
81
-          <preferred-size width="150" height="50" />
82
-        </default-constraints>
83
-      </item>
84
-      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
85
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
86
-          <preferred-size width="150" height="50" />
87
-        </default-constraints>
88
-      </item>
89
-      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
90
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
91
-          <preferred-size width="200" height="200" />
92
-        </default-constraints>
93
-      </item>
94
-      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
95
-        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
96
-          <preferred-size width="200" height="200" />
97
-        </default-constraints>
98
-      </item>
99
-      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
100
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
101
-      </item>
102
-      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
103
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
104
-      </item>
105
-      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
106
-        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
107
-      </item>
108
-      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
109
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
110
-      </item>
111
-      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
112
-        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
113
-          <preferred-size width="-1" height="20" />
114
-        </default-constraints>
115
-      </item>
116
-      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
117
-        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
118
-      </item>
119
-      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
120
-        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
121
-      </item>
122
-    </group>
123
-  </component>
124
-</project>

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


+ 163
- 1426
.idea/workspace.xml
File diff suppressed because it is too large
View File


+ 1
- 0
README.md View File

@@ -20,3 +20,4 @@
20 20
 	* `StreamConverter` - demonstrates the conversion from `Stream<SomeType>` to
21 21
 		* array representation: `SomeType[]`
22 22
 		* list representation: `List<SomeType>`
23
+# streams-and-lambdas

+ 16
- 0
looptest.iml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4
+    <output url="file://$MODULE_DIR$/target/classes" />
5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
+    <content url="file://$MODULE_DIR$">
7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
9
+      <excludeFolder url="file://$MODULE_DIR$/target" />
10
+    </content>
11
+    <orderEntry type="inheritedJdk" />
12
+    <orderEntry type="sourceFolder" forTests="false" />
13
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
14
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13-beta-1" level="project" />
15
+  </component>
16
+</module>

+ 20
- 0
pom.xml View File

@@ -7,11 +7,31 @@
7 7
     <groupId>mygroupid</groupId>
8 8
     <artifactId>looptest</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <build>
11
+        <plugins>
12
+            <plugin>
13
+                <groupId>org.apache.maven.plugins</groupId>
14
+                <artifactId>maven-compiler-plugin</artifactId>
15
+                <configuration>
16
+                    <source>8</source>
17
+                    <target>8</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
10 22
     <dependencies>
11 23
         <dependency>
12 24
             <groupId>junit</groupId>
25
+            <artifactId>junit-dep</artifactId>
26
+            <version>4.11</version>
27
+            <type>pom</type>
28
+            <scope>test</scope>
29
+        </dependency>
30
+        <dependency>
31
+            <groupId>junit</groupId>
13 32
             <artifactId>junit</artifactId>
14 33
             <version>RELEASE</version>
34
+            <scope>test</scope>
15 35
         </dependency>
16 36
     </dependencies>
17 37
 

BIN
src/.DS_Store View File


BIN
src/main/.DS_Store View File


BIN
src/main/java/.DS_Store View File


BIN
src/main/java/com/.DS_Store View File


BIN
src/main/java/com/zipcodewilmington/.DS_Store View File


BIN
src/main/java/com/zipcodewilmington/streams/.DS_Store View File


+ 7
- 4
src/main/java/com/zipcodewilmington/streams/StreamFilter.java View File

@@ -1,12 +1,10 @@
1 1
 package com.zipcodewilmington.streams;
2 2
 
3 3
 import com.zipcodewilmington.streams.anthropoid.Person;
4
-import com.zipcodewilmington.streams.anthropoid.PersonFactory;
5
-import com.zipcodewilmington.streams.tools.RandomUtils;
6
-import com.zipcodewilmington.streams.tools.StringUtils;
7 4
 
5
+import java.util.Arrays;
8 6
 import java.util.List;
9
-import java.util.stream.Collectors;
7
+import java.util.stream.IntStream;
10 8
 import java.util.stream.Stream;
11 9
 
12 10
 /**
@@ -21,6 +19,11 @@ public class StreamFilter {
21 19
      */ //TODO - construct person stream of 100 person objects; startingCharacter is a random capital letter
22 20
     public StreamFilter() {
23 21
         this(Stream.empty(), null);
22
+        IntStream
23
+                .range(1,100)
24
+                .forEach(System.out::print);
25
+        System.out.println();
26
+
24 27
     }
25 28
 
26 29
     /**

+ 0
- 0
src/main/java/com/zipcodewilmington/streams/StreamMap.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/anthropoid/Person.java View File


+ 6
- 3
src/main/java/com/zipcodewilmington/streams/anthropoid/PersonFactory.java View File

@@ -3,6 +3,7 @@ package com.zipcodewilmington.streams.anthropoid;
3 3
 import com.zipcodewilmington.streams.tools.RandomUtils;
4 4
 import com.zipcodewilmington.streams.tools.StringUtils;
5 5
 
6
+import java.util.ArrayList;
6 7
 import java.util.Date;
7 8
 import java.util.List;
8 9
 import java.util.stream.Collectors;
@@ -39,7 +40,7 @@ public final class PersonFactory {
39 40
      * @return - ArrayList of Person objects
40 41
      */ // TODO
41 42
     public static List<Person> createPersonList(int listSize) {
42
-        return null;
43
+        return createPersonStream(listSize).collect(Collectors.toList());
43 44
     }
44 45
 
45 46
 
@@ -48,7 +49,9 @@ public final class PersonFactory {
48 49
      * @return - Array of Person objects
49 50
      */ // TODO
50 51
     public static Person[] createPersonArray(int arrayLength) {
51
-        return null;
52
+        Person[] people = new Person[arrayLength];
53
+        return createPersonList(arrayLength).toArray(people);
54
+
52 55
     }
53 56
 
54 57
 
@@ -58,6 +61,6 @@ public final class PersonFactory {
58 61
      * @return - Stream representation of collection of Person objects
59 62
      */ // TODO
60 63
     public static Stream<Person> createPersonStream(int streamCount) {
61
-        return null;
64
+        return Stream.generate(()->createRandomPerson()).limit(streamCount);
62 65
     }
63 66
 }

+ 8
- 7
src/main/java/com/zipcodewilmington/streams/anthropoid/PersonWarehouse.java View File

@@ -5,6 +5,7 @@ import com.zipcodewilmington.streams.tools.logging.LoggerHandler;
5 5
 import com.zipcodewilmington.streams.tools.logging.LoggerWarehouse;
6 6
 
7 7
 import java.util.ArrayList;
8
+import java.util.Arrays;
8 9
 import java.util.List;
9 10
 import java.util.Map;
10 11
 import java.util.stream.Collectors;
@@ -35,7 +36,7 @@ public final class PersonWarehouse {
35 36
      * @return list of uniquely named Person objects
36 37
      */ //TODO
37 38
     public static Stream<Person> getUniquelyNamedPeople() {
38
-        return null;
39
+        return people.stream().distinct();
39 40
     }
40 41
 
41 42
 
@@ -44,7 +45,7 @@ public final class PersonWarehouse {
44 45
      * @return a Stream of respective
45 46
      */ //TODO
46 47
     public static Stream<Person> getUniquelyNamedPeopleStartingWith(Character character) {
47
-        return null;
48
+        return getUniquelyNamedPeople().filter(person -> person.getName().startsWith(character.toString()));
48 49
     }
49 50
 
50 51
     /**
@@ -52,14 +53,14 @@ public final class PersonWarehouse {
52 53
      * @return a Stream of respective
53 54
      */ //TODO
54 55
     public static Stream<Person> getFirstNUniquelyNamedPeople(int n) {
55
-        return null;
56
+        return getFirstNUniquelyNamedPeople(n);
56 57
     }
57 58
 
58 59
     /**
59 60
      * @return a mapping of Person Id to the respective Person name
60 61
      */ // TODO
61 62
     public static Map<Long, String> getIdToNameMap() {
62
-        return null;
63
+        return people.stream().collect(Collectors.toMap(Person::getPersonalId,Person::getName));
63 64
     }
64 65
 
65 66
 
@@ -67,7 +68,7 @@ public final class PersonWarehouse {
67 68
      * @return Stream of Stream of Aliases
68 69
      */ // TODO
69 70
     public static Stream<Stream<String>> getNestedAliases() {
70
-        return null;
71
+        return people.stream().map(person -> Arrays.stream(person.getAliases()));
71 72
     }
72 73
 
73 74
 
@@ -75,14 +76,14 @@ public final class PersonWarehouse {
75 76
      * @return Stream of all Aliases
76 77
      */ // TODO
77 78
     public static Stream<String> getAllAliases() {
78
-        return null;
79
+        return people.stream().flatMap(person -> Arrays.stream(person.aliases));
79 80
     }
80 81
 
81 82
     /**
82 83
      * @return list of names of Person objects
83 84
      */ // TODO
84 85
     public static List<String> getNames() {
85
-        return null;
86
+        return people.stream().map(person -> person.getName()).collect(Collectors.toList());
86 87
     }
87 88
 
88 89
     /**

+ 3
- 2
src/main/java/com/zipcodewilmington/streams/conversions/ArrayConverter.java View File

@@ -23,12 +23,13 @@ public final class ArrayConverter extends PersonConversionAgent<Person[]> {
23 23
 
24 24
     //TODO
25 25
     public List<Person> toList() {
26
-        return null;
26
+        return toList();
27 27
     }
28 28
 
29 29
     //TODO
30 30
     public Stream<Person> toStream() {
31
-        return null;
31
+        return toStream();
32
+        //return Person.forEach(Person -> toStream().toString());
32 33
     }
33 34
 
34 35
     @Override

+ 0
- 0
src/main/java/com/zipcodewilmington/streams/conversions/ConversionAgent.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/conversions/ListConverter.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/conversions/PersonConversionAgent.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/conversions/StreamConverter.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/DateUtils.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/RandomUtils.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/ReflectionUtils.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/StringUtils.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/logging/LoggerHandler.java View File


+ 0
- 0
src/main/java/com/zipcodewilmington/streams/tools/logging/LoggerWarehouse.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/TestConstants.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/TestStreamFilter.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/TestSuiteFullRegression.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/anthropoid/TestPerson.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/anthropoid/TestPersonFactory.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/anthropoid/TestPersonWarehouse.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/anthropoid/TestSuiteAnthropoidRegression.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/conversions/TestConversionAgent.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/conversions/TestConverterArray.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/conversions/TestConverterList.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/conversions/TestConverterStream.java View File


+ 0
- 0
src/test/java/com/zipcodewilmington/streams/conversions/TestSuiteConversionRegression.java View File


+ 0
- 0
streamdemo.iml View File


+ 83922
- 6
target/PersonWarehouse.leonlog
File diff suppressed because it is too large
View File


+ 0
- 0
target/allclasses-frame.html View File


+ 0
- 0
target/allclasses-noframe.html View File


BIN
target/classes/com/zipcodewilmington/streams/StreamFilter.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/StreamMap.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/anthropoid/Person.class View File


BIN
target/classes/com/zipcodewilmington/streams/anthropoid/PersonFactory.class View File


BIN
target/classes/com/zipcodewilmington/streams/anthropoid/PersonWarehouse.class View File


BIN
target/classes/com/zipcodewilmington/streams/conversions/ArrayConverter.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/conversions/ConversionAgent.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/conversions/ListConverter.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/conversions/PersonConversionAgent.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/conversions/StreamConverter.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/DateUtils.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/RandomUtils.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/ReflectionUtils$1.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/ReflectionUtils.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/StringUtils.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/logging/LoggerHandler.class View File


+ 0
- 0
target/classes/com/zipcodewilmington/streams/tools/logging/LoggerWarehouse.class View File


+ 0
- 0
target/com/zipcodewilmington/streams/StreamFilter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/StreamMap.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/TestConstants.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/TestStreamFilter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/TestStreamMap.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/TestSuiteFullRegression.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/Person.PersonProperty.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/Person.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/PersonFactory.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/TestPerson.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/TestPersonFactory.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/package-frame.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/package-summary.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/anthropoid/package-tree.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/ArrayConverter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/ConversionAgent.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/ListConverter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/StreamConverter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/TestConversionAgent.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/TestConverterArray.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/TestConverterList.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/TestConverterStream.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/TestSuiteConversionRegression.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/package-frame.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/package-summary.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/conversions/package-tree.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/exercises/ArrayConverter.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/exercises/ConversionAgent.html View File


+ 0
- 0
target/com/zipcodewilmington/streams/exercises/ListConverter.html View File


Some files were not shown because too many files changed in this diff