rjsmall90 6 jaren geleden
bovenliggende
commit
3bfddb9fad

BIN
.DS_Store Bestand weergeven


+ 1
- 0
.idea/.name Bestand weergeven

@@ -0,0 +1 @@
1
+generics

+ 16
- 0
.idea/compiler.xml Bestand weergeven

@@ -0,0 +1,16 @@
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="generics" />
10
+      </profile>
11
+    </annotationProcessing>
12
+    <bytecodeTargetLevel>
13
+      <module name="generics" target="1.7" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_12.xml Bestand weergeven

@@ -0,0 +1,13 @@
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__org_hamcrest_hamcrest_core_1_3.xml Bestand weergeven

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

+ 16
- 0
.idea/misc.xml Bestand weergeven

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

+ 8
- 0
.idea/modules.xml Bestand weergeven

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/generics.iml" filepath="$PROJECT_DIR$/generics.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml Bestand weergeven

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

+ 629
- 0
.idea/workspace.xml Bestand weergeven

@@ -0,0 +1,629 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="f3c0e959-8b59-4afa-a90f-8215618f997f" name="Default" comment="">
5
+      <change beforePath="" afterPath="$PROJECT_DIR$/.idea/compiler.xml" />
6
+      <change beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" />
7
+      <change beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" />
8
+      <change beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
9
+      <change beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
10
+      <change beforePath="" afterPath="$PROJECT_DIR$/generics.iml" />
11
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
12
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/main/java/MyMap.java" />
13
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/main/java/MySet.java" />
14
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
15
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/test/java/MyMapTest.java" />
16
+      <change beforePath="" afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" />
17
+    </list>
18
+    <ignored path="$PROJECT_DIR$/target/" />
19
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
20
+    <option name="TRACKING_ENABLED" value="true" />
21
+    <option name="SHOW_DIALOG" value="false" />
22
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
23
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
24
+    <option name="LAST_RESOLUTION" value="IGNORE" />
25
+  </component>
26
+  <component name="FileEditorManager">
27
+    <leaf>
28
+      <file leaf-file-name="MyArrayList.java" pinned="false" current-in-tab="false">
29
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
30
+          <provider selected="true" editor-type-id="text-editor">
31
+            <state relative-caret-position="169">
32
+              <caret line="54" column="27" lean-forward="false" selection-start-line="54" selection-start-column="27" selection-end-line="54" selection-end-column="27" />
33
+              <folding />
34
+            </state>
35
+          </provider>
36
+        </entry>
37
+      </file>
38
+      <file leaf-file-name="MyArrayListTest.java" pinned="false" current-in-tab="false">
39
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
40
+          <provider selected="true" editor-type-id="text-editor">
41
+            <state relative-caret-position="-1409">
42
+              <caret line="133" column="53" lean-forward="false" selection-start-line="133" selection-start-column="53" selection-end-line="133" selection-end-column="53" />
43
+              <folding />
44
+            </state>
45
+          </provider>
46
+        </entry>
47
+      </file>
48
+      <file leaf-file-name="MySet.java" pinned="false" current-in-tab="true">
49
+        <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
50
+          <provider selected="true" editor-type-id="text-editor">
51
+            <state relative-caret-position="186">
52
+              <caret line="57" column="0" lean-forward="false" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
53
+              <folding>
54
+                <element signature="e#184#185#0" expanded="true" />
55
+                <element signature="e#218#219#0" expanded="true" />
56
+                <element signature="e#254#255#0" expanded="true" />
57
+                <element signature="e#298#299#0" expanded="true" />
58
+                <element signature="e#1956#1957#0" expanded="true" />
59
+                <element signature="e#1995#1996#0" expanded="true" />
60
+                <element signature="e#2773#2774#0" expanded="true" />
61
+                <element signature="e#2824#2825#0" expanded="true" />
62
+                <element signature="e#2853#2854#0" expanded="true" />
63
+                <element signature="e#2893#2894#0" expanded="true" />
64
+              </folding>
65
+            </state>
66
+          </provider>
67
+        </entry>
68
+      </file>
69
+      <file leaf-file-name="MySetTest.java" pinned="false" current-in-tab="false">
70
+        <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
71
+          <provider selected="true" editor-type-id="text-editor">
72
+            <state relative-caret-position="240">
73
+              <caret line="124" column="0" lean-forward="false" selection-start-line="124" selection-start-column="0" selection-end-line="124" selection-end-column="0" />
74
+              <folding />
75
+            </state>
76
+          </provider>
77
+        </entry>
78
+      </file>
79
+      <file leaf-file-name="MyMapTest.java" pinned="false" current-in-tab="false">
80
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
81
+          <provider selected="true" editor-type-id="text-editor">
82
+            <state relative-caret-position="30">
83
+              <caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
84
+              <folding />
85
+            </state>
86
+          </provider>
87
+        </entry>
88
+      </file>
89
+      <file leaf-file-name="MyMap.java" pinned="false" current-in-tab="false">
90
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
91
+          <provider selected="true" editor-type-id="text-editor">
92
+            <state relative-caret-position="0">
93
+              <caret line="0" column="13" lean-forward="false" selection-start-line="0" selection-start-column="13" selection-end-line="0" selection-end-column="13" />
94
+              <folding />
95
+            </state>
96
+          </provider>
97
+        </entry>
98
+      </file>
99
+    </leaf>
100
+  </component>
101
+  <component name="Git.Settings">
102
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
103
+  </component>
104
+  <component name="GradleLocalSettings">
105
+    <option name="externalProjectsViewState">
106
+      <projects_view />
107
+    </option>
108
+  </component>
109
+  <component name="IdeDocumentHistory">
110
+    <option name="CHANGED_PATHS">
111
+      <list>
112
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
113
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
114
+        <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
115
+        <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
116
+      </list>
117
+    </option>
118
+  </component>
119
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
120
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
121
+  <component name="JsGulpfileManager">
122
+    <detection-done>true</detection-done>
123
+    <sorting>DEFINITION_ORDER</sorting>
124
+  </component>
125
+  <component name="ProjectFrameBounds" extendedState="1">
126
+    <option name="y" value="22" />
127
+    <option name="width" value="1280" />
128
+    <option name="height" value="715" />
129
+  </component>
130
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
131
+    <ConfirmationsSetting value="2" id="Add" />
132
+  </component>
133
+  <component name="ProjectView">
134
+    <navigator currentView="ProjectPane" proportions="" version="1">
135
+      <flattenPackages />
136
+      <showMembers />
137
+      <showModules />
138
+      <showLibraryContents />
139
+      <hideEmptyPackages />
140
+      <abbreviatePackageNames />
141
+      <autoscrollToSource />
142
+      <autoscrollFromSource />
143
+      <sortByType />
144
+      <manualOrder />
145
+      <foldersAlwaysOnTop value="true" />
146
+    </navigator>
147
+    <panes>
148
+      <pane id="ProjectPane">
149
+        <subPane>
150
+          <expand>
151
+            <path>
152
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
153
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
154
+            </path>
155
+            <path>
156
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
157
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
158
+              <item name="src" type="462c0819:PsiDirectoryNode" />
159
+            </path>
160
+            <path>
161
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
162
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
163
+              <item name="src" type="462c0819:PsiDirectoryNode" />
164
+              <item name="main" type="462c0819:PsiDirectoryNode" />
165
+            </path>
166
+            <path>
167
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
168
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
169
+              <item name="src" type="462c0819:PsiDirectoryNode" />
170
+              <item name="main" type="462c0819:PsiDirectoryNode" />
171
+              <item name="java" type="462c0819:PsiDirectoryNode" />
172
+            </path>
173
+            <path>
174
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
175
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
176
+              <item name="src" type="462c0819:PsiDirectoryNode" />
177
+              <item name="test" type="462c0819:PsiDirectoryNode" />
178
+            </path>
179
+            <path>
180
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
181
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
182
+              <item name="src" type="462c0819:PsiDirectoryNode" />
183
+              <item name="test" type="462c0819:PsiDirectoryNode" />
184
+              <item name="java" type="462c0819:PsiDirectoryNode" />
185
+            </path>
186
+          </expand>
187
+          <select />
188
+        </subPane>
189
+      </pane>
190
+      <pane id="PackagesPane" />
191
+      <pane id="AndroidView" />
192
+      <pane id="Scratches" />
193
+      <pane id="Scope" />
194
+    </panes>
195
+  </component>
196
+  <component name="PropertiesComponent">
197
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
198
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
199
+    <property name="WebServerToolWindowFactoryState" value="false" />
200
+    <property name="aspect.path.notification.shown" value="true" />
201
+  </component>
202
+  <component name="RunDashboard">
203
+    <option name="ruleStates">
204
+      <list>
205
+        <RuleState>
206
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
207
+        </RuleState>
208
+        <RuleState>
209
+          <option name="name" value="StatusDashboardGroupingRule" />
210
+        </RuleState>
211
+      </list>
212
+    </option>
213
+  </component>
214
+  <component name="RunManager" selected="JUnit.MySetTest.testContainsAllInt">
215
+    <configuration default="true" type="Applet" factoryName="Applet">
216
+      <option name="HTML_USED" value="false" />
217
+      <option name="WIDTH" value="400" />
218
+      <option name="HEIGHT" value="300" />
219
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
220
+      <module />
221
+    </configuration>
222
+    <configuration default="true" type="Application" factoryName="Application">
223
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
224
+      <option name="MAIN_CLASS_NAME" />
225
+      <option name="VM_PARAMETERS" />
226
+      <option name="PROGRAM_PARAMETERS" />
227
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
228
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
229
+      <option name="ALTERNATIVE_JRE_PATH" />
230
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
231
+      <option name="ENV_VARIABLES" />
232
+      <option name="PASS_PARENT_ENVS" value="true" />
233
+      <module name="" />
234
+      <envs />
235
+    </configuration>
236
+    <configuration name="MySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
237
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
238
+      <module name="generics" />
239
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
240
+      <option name="ALTERNATIVE_JRE_PATH" />
241
+      <option name="PACKAGE_NAME" value="" />
242
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
243
+      <option name="METHOD_NAME" />
244
+      <option name="TEST_OBJECT" value="class" />
245
+      <option name="VM_PARAMETERS" value="-ea" />
246
+      <option name="PARAMETERS" />
247
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
248
+      <option name="ENV_VARIABLES" />
249
+      <option name="PASS_PARENT_ENVS" value="true" />
250
+      <option name="TEST_SEARCH_SCOPE">
251
+        <value defaultName="singleModule" />
252
+      </option>
253
+      <envs />
254
+      <patterns />
255
+    </configuration>
256
+    <configuration name="MySetTest.testContainsAllInt" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
257
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
258
+      <module name="generics" />
259
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
260
+      <option name="ALTERNATIVE_JRE_PATH" />
261
+      <option name="PACKAGE_NAME" value="" />
262
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
263
+      <option name="METHOD_NAME" value="testContainsAllInt" />
264
+      <option name="TEST_OBJECT" value="method" />
265
+      <option name="VM_PARAMETERS" value="-ea" />
266
+      <option name="PARAMETERS" />
267
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
268
+      <option name="ENV_VARIABLES" />
269
+      <option name="PASS_PARENT_ENVS" value="true" />
270
+      <option name="TEST_SEARCH_SCOPE">
271
+        <value defaultName="singleModule" />
272
+      </option>
273
+      <envs />
274
+      <patterns />
275
+    </configuration>
276
+    <configuration name="MySetTest.testEqualsToSpecificElement" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
277
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
278
+      <module name="generics" />
279
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
280
+      <option name="ALTERNATIVE_JRE_PATH" />
281
+      <option name="PACKAGE_NAME" value="" />
282
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
283
+      <option name="METHOD_NAME" value="testEqualsToSpecificElement" />
284
+      <option name="TEST_OBJECT" value="method" />
285
+      <option name="VM_PARAMETERS" value="-ea" />
286
+      <option name="PARAMETERS" />
287
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
288
+      <option name="ENV_VARIABLES" />
289
+      <option name="PASS_PARENT_ENVS" value="true" />
290
+      <option name="TEST_SEARCH_SCOPE">
291
+        <value defaultName="singleModule" />
292
+      </option>
293
+      <envs />
294
+      <patterns />
295
+    </configuration>
296
+    <configuration name="MySetTest.testHashCodeInt" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
297
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
298
+      <module name="generics" />
299
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
300
+      <option name="ALTERNATIVE_JRE_PATH" />
301
+      <option name="PACKAGE_NAME" value="" />
302
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
303
+      <option name="METHOD_NAME" value="testHashCodeInt" />
304
+      <option name="TEST_OBJECT" value="method" />
305
+      <option name="VM_PARAMETERS" value="-ea" />
306
+      <option name="PARAMETERS" />
307
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
308
+      <option name="ENV_VARIABLES" />
309
+      <option name="PASS_PARENT_ENVS" value="true" />
310
+      <option name="TEST_SEARCH_SCOPE">
311
+        <value defaultName="singleModule" />
312
+      </option>
313
+      <envs />
314
+      <patterns />
315
+    </configuration>
316
+    <configuration name="MySetTest.testToArrayInt" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
317
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
318
+      <module name="generics" />
319
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
320
+      <option name="ALTERNATIVE_JRE_PATH" />
321
+      <option name="PACKAGE_NAME" value="" />
322
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
323
+      <option name="METHOD_NAME" value="testToArrayInt" />
324
+      <option name="TEST_OBJECT" value="method" />
325
+      <option name="VM_PARAMETERS" value="-ea" />
326
+      <option name="PARAMETERS" />
327
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
328
+      <option name="ENV_VARIABLES" />
329
+      <option name="PASS_PARENT_ENVS" value="true" />
330
+      <option name="TEST_SEARCH_SCOPE">
331
+        <value defaultName="singleModule" />
332
+      </option>
333
+      <envs />
334
+      <patterns />
335
+    </configuration>
336
+    <configuration default="true" type="JUnit" factoryName="JUnit">
337
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
338
+      <module name="" />
339
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
340
+      <option name="ALTERNATIVE_JRE_PATH" />
341
+      <option name="PACKAGE_NAME" />
342
+      <option name="MAIN_CLASS_NAME" />
343
+      <option name="METHOD_NAME" />
344
+      <option name="TEST_OBJECT" value="class" />
345
+      <option name="VM_PARAMETERS" value="-ea" />
346
+      <option name="PARAMETERS" />
347
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
348
+      <option name="ENV_VARIABLES" />
349
+      <option name="PASS_PARENT_ENVS" value="true" />
350
+      <option name="TEST_SEARCH_SCOPE">
351
+        <value defaultName="singleModule" />
352
+      </option>
353
+      <envs />
354
+      <patterns />
355
+    </configuration>
356
+    <configuration default="true" type="Remote" factoryName="Remote">
357
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
358
+      <option name="SERVER_MODE" value="false" />
359
+      <option name="SHMEM_ADDRESS" value="javadebug" />
360
+      <option name="HOST" value="localhost" />
361
+      <option name="PORT" value="5005" />
362
+    </configuration>
363
+    <configuration default="true" type="TestNG" factoryName="TestNG">
364
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
365
+      <module name="" />
366
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
367
+      <option name="ALTERNATIVE_JRE_PATH" />
368
+      <option name="SUITE_NAME" />
369
+      <option name="PACKAGE_NAME" />
370
+      <option name="MAIN_CLASS_NAME" />
371
+      <option name="METHOD_NAME" />
372
+      <option name="GROUP_NAME" />
373
+      <option name="TEST_OBJECT" value="CLASS" />
374
+      <option name="VM_PARAMETERS" value="-ea" />
375
+      <option name="PARAMETERS" />
376
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
377
+      <option name="OUTPUT_DIRECTORY" />
378
+      <option name="ANNOTATION_TYPE" />
379
+      <option name="ENV_VARIABLES" />
380
+      <option name="PASS_PARENT_ENVS" value="true" />
381
+      <option name="TEST_SEARCH_SCOPE">
382
+        <value defaultName="singleModule" />
383
+      </option>
384
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
385
+      <option name="PROPERTIES_FILE" />
386
+      <envs />
387
+      <properties />
388
+      <listeners />
389
+    </configuration>
390
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
391
+      <module name="" />
392
+      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
393
+      <option name="PROGRAM_PARAMETERS" />
394
+      <predefined_log_file id="idea.log" enabled="true" />
395
+    </configuration>
396
+    <list size="5">
397
+      <item index="0" class="java.lang.String" itemvalue="JUnit.MySetTest.testContainsAllInt" />
398
+      <item index="1" class="java.lang.String" itemvalue="JUnit.MySetTest.testEqualsToSpecificElement" />
399
+      <item index="2" class="java.lang.String" itemvalue="JUnit.MySetTest.testHashCodeInt" />
400
+      <item index="3" class="java.lang.String" itemvalue="JUnit.MySetTest.testToArrayInt" />
401
+      <item index="4" class="java.lang.String" itemvalue="JUnit.MySetTest" />
402
+    </list>
403
+    <recent_temporary>
404
+      <list size="5">
405
+        <item index="0" class="java.lang.String" itemvalue="JUnit.MySetTest.testContainsAllInt" />
406
+        <item index="1" class="java.lang.String" itemvalue="JUnit.MySetTest" />
407
+        <item index="2" class="java.lang.String" itemvalue="JUnit.MySetTest.testToArrayInt" />
408
+        <item index="3" class="java.lang.String" itemvalue="JUnit.MySetTest.testHashCodeInt" />
409
+        <item index="4" class="java.lang.String" itemvalue="JUnit.MySetTest.testEqualsToSpecificElement" />
410
+      </list>
411
+    </recent_temporary>
412
+  </component>
413
+  <component name="ShelveChangesManager" show_recycled="false">
414
+    <option name="remove_strategy" value="false" />
415
+  </component>
416
+  <component name="SvnConfiguration">
417
+    <configuration />
418
+  </component>
419
+  <component name="TaskManager">
420
+    <task active="true" id="Default" summary="Default task">
421
+      <changelist id="f3c0e959-8b59-4afa-a90f-8215618f997f" name="Default" comment="" />
422
+      <created>1530154597306</created>
423
+      <option name="number" value="Default" />
424
+      <option name="presentableId" value="Default" />
425
+      <updated>1530154597306</updated>
426
+      <workItem from="1530154598850" duration="14384000" />
427
+    </task>
428
+    <servers />
429
+  </component>
430
+  <component name="TestHistory">
431
+    <history-entry file="MySetTest - 2018.06.28 at 14h 24m 58s.xml">
432
+      <configuration name="MySetTest" configurationId="JUnit" />
433
+    </history-entry>
434
+    <history-entry file="MySetTest - 2018.06.28 at 14h 25m 32s.xml">
435
+      <configuration name="MySetTest" configurationId="JUnit" />
436
+    </history-entry>
437
+    <history-entry file="MySetTest - 2018.06.28 at 14h 44m 43s.xml">
438
+      <configuration name="MySetTest" configurationId="JUnit" />
439
+    </history-entry>
440
+    <history-entry file="MySetTest - 2018.06.28 at 14h 45m 18s.xml">
441
+      <configuration name="MySetTest" configurationId="JUnit" />
442
+    </history-entry>
443
+    <history-entry file="MySetTest - 2018.06.28 at 14h 46m 41s.xml">
444
+      <configuration name="MySetTest" configurationId="JUnit" />
445
+    </history-entry>
446
+    <history-entry file="MySetTest - 2018.06.28 at 15h 50m 40s.xml">
447
+      <configuration name="MySetTest" configurationId="JUnit" />
448
+    </history-entry>
449
+    <history-entry file="MySetTest - 2018.06.28 at 15h 51m 19s.xml">
450
+      <configuration name="MySetTest" configurationId="JUnit" />
451
+    </history-entry>
452
+    <history-entry file="MySetTest - 2018.06.28 at 15h 54m 43s.xml">
453
+      <configuration name="MySetTest" configurationId="JUnit" />
454
+    </history-entry>
455
+    <history-entry file="MySetTest_testContainsAllInt - 2018.06.28 at 15h 57m 56s.xml">
456
+      <configuration name="MySetTest.testContainsAllInt" configurationId="JUnit" />
457
+    </history-entry>
458
+    <history-entry file="MySetTest_testToArrayInt - 2018.06.28 at 14h 07m 20s.xml">
459
+      <configuration name="MySetTest.testToArrayInt" configurationId="JUnit" />
460
+    </history-entry>
461
+  </component>
462
+  <component name="TimeTrackingManager">
463
+    <option name="totallyTimeSpent" value="14384000" />
464
+  </component>
465
+  <component name="ToolWindowManager">
466
+    <frame x="0" y="22" width="1280" height="715" extended-state="1" />
467
+    <editor active="true" />
468
+    <layout>
469
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
470
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
471
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32998326" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
472
+      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
473
+      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
474
+      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
475
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
476
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
477
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32998326" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
478
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
479
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
480
+      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
481
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
482
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24959612" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
483
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
484
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
485
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
486
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
487
+      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
488
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.39865997" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
489
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
490
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
491
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
492
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
493
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
494
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
495
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
496
+    </layout>
497
+  </component>
498
+  <component name="TypeScriptGeneratedFilesManager">
499
+    <option name="version" value="1" />
500
+  </component>
501
+  <component name="VcsContentAnnotationSettings">
502
+    <option name="myLimit" value="2678400000" />
503
+  </component>
504
+  <component name="XDebuggerManager">
505
+    <breakpoint-manager>
506
+      <breakpoints>
507
+        <line-breakpoint enabled="true" type="java-method">
508
+          <url>file://$PROJECT_DIR$/src/test/java/MySetTest.java</url>
509
+          <line>116</line>
510
+          <properties class="MySetTest" method="testContainsAllInt">
511
+            <option name="EMULATED" value="true" />
512
+          </properties>
513
+          <option name="timeStamp" value="3" />
514
+        </line-breakpoint>
515
+      </breakpoints>
516
+      <option name="time" value="4" />
517
+    </breakpoint-manager>
518
+    <watches-manager />
519
+  </component>
520
+  <component name="editorHistoryManager">
521
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
522
+      <provider selected="true" editor-type-id="text-editor">
523
+        <state relative-caret-position="30">
524
+          <caret line="2" column="13" lean-forward="false" selection-start-line="2" selection-start-column="13" selection-end-line="2" selection-end-column="13" />
525
+          <folding />
526
+        </state>
527
+      </provider>
528
+    </entry>
529
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
530
+      <provider selected="true" editor-type-id="text-editor">
531
+        <state relative-caret-position="0">
532
+          <caret line="0" column="13" lean-forward="false" selection-start-line="0" selection-start-column="13" selection-end-line="0" selection-end-column="13" />
533
+          <folding />
534
+        </state>
535
+      </provider>
536
+    </entry>
537
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
538
+      <provider selected="true" editor-type-id="text-editor">
539
+        <state relative-caret-position="169">
540
+          <caret line="54" column="27" lean-forward="false" selection-start-line="54" selection-start-column="27" selection-end-line="54" selection-end-column="27" />
541
+          <folding />
542
+        </state>
543
+      </provider>
544
+    </entry>
545
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
546
+      <provider selected="true" editor-type-id="text-editor">
547
+        <state relative-caret-position="-1409">
548
+          <caret line="133" column="53" lean-forward="false" selection-start-line="133" selection-start-column="53" selection-end-line="133" selection-end-column="53" />
549
+          <folding />
550
+        </state>
551
+      </provider>
552
+    </entry>
553
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/BlockJUnit4ClassRunner.class">
554
+      <provider selected="true" editor-type-id="text-editor">
555
+        <state relative-caret-position="111">
556
+          <caret line="49" column="0" lean-forward="false" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" />
557
+          <folding />
558
+        </state>
559
+      </provider>
560
+    </entry>
561
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runner/JUnitCore.class">
562
+      <provider selected="true" editor-type-id="text-editor">
563
+        <state relative-caret-position="102">
564
+          <caret line="76" column="0" lean-forward="false" selection-start-line="76" selection-start-column="0" selection-end-line="76" selection-end-column="0" />
565
+          <folding />
566
+        </state>
567
+      </provider>
568
+    </entry>
569
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/ParentRunner.class">
570
+      <provider selected="true" editor-type-id="text-editor">
571
+        <state relative-caret-position="102">
572
+          <caret line="240" column="0" lean-forward="false" selection-start-line="240" selection-start-column="0" selection-end-line="240" selection-end-column="0" />
573
+          <folding />
574
+        </state>
575
+      </provider>
576
+    </entry>
577
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
578
+      <provider selected="true" editor-type-id="text-editor">
579
+        <state relative-caret-position="210">
580
+          <caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
581
+          <folding />
582
+        </state>
583
+      </provider>
584
+    </entry>
585
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
586
+      <provider selected="true" editor-type-id="text-editor">
587
+        <state relative-caret-position="240">
588
+          <caret line="124" column="0" lean-forward="false" selection-start-line="124" selection-start-column="0" selection-end-line="124" selection-end-column="0" />
589
+          <folding />
590
+        </state>
591
+      </provider>
592
+    </entry>
593
+    <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
594
+      <provider selected="true" editor-type-id="text-editor">
595
+        <state relative-caret-position="186">
596
+          <caret line="57" column="0" lean-forward="false" selection-start-line="57" selection-start-column="0" selection-end-line="57" selection-end-column="0" />
597
+          <folding>
598
+            <element signature="e#184#185#0" expanded="true" />
599
+            <element signature="e#218#219#0" expanded="true" />
600
+            <element signature="e#254#255#0" expanded="true" />
601
+            <element signature="e#298#299#0" expanded="true" />
602
+            <element signature="e#1956#1957#0" expanded="true" />
603
+            <element signature="e#1995#1996#0" expanded="true" />
604
+            <element signature="e#2773#2774#0" expanded="true" />
605
+            <element signature="e#2824#2825#0" expanded="true" />
606
+            <element signature="e#2853#2854#0" expanded="true" />
607
+            <element signature="e#2893#2894#0" expanded="true" />
608
+          </folding>
609
+        </state>
610
+      </provider>
611
+    </entry>
612
+  </component>
613
+  <component name="masterDetails">
614
+    <states>
615
+      <state key="ProjectJDKs.UI">
616
+        <settings>
617
+          <last-edited>1.8</last-edited>
618
+          <splitter-proportions>
619
+            <option name="proportions">
620
+              <list>
621
+                <option value="0.2" />
622
+              </list>
623
+            </option>
624
+          </splitter-proportions>
625
+        </settings>
626
+      </state>
627
+    </states>
628
+  </component>
629
+</project>

+ 16
- 0
generics.iml Bestand weergeven

@@ -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_7">
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" name="Maven: junit:junit:4.12" level="project" />
14
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
15
+  </component>
16
+</module>

BIN
src/.DS_Store Bestand weergeven


BIN
src/main/.DS_Store Bestand weergeven


+ 93
- 0
src/main/java/MyArrayList.java Bestand weergeven

@@ -0,0 +1,93 @@
1
+import java.util.Arrays;
2
+
3
+public class MyArrayList<I> {
4
+
5
+    private I[] inputArray;
6
+
7
+    public MyArrayList(){}
8
+
9
+    public MyArrayList(I[] inputArray){
10
+        this.inputArray = inputArray;
11
+    }
12
+
13
+    public I[] add(I x){
14
+        Object[] newArr = new Object[inputArray.length+1];
15
+        System.arraycopy(inputArray, 0 , newArr, 0, inputArray.length);
16
+        newArr[newArr.length-1]= x;
17
+
18
+        inputArray = (I []) newArr;
19
+        return inputArray;
20
+    }
21
+
22
+    public I get(I x) {
23
+        I result = null;
24
+        for(I i : inputArray) if(i == x) result = i;
25
+
26
+        System.out.println(result);
27
+        return result;
28
+    }
29
+
30
+    public I[] remove(Integer index) {
31
+        Object[] newArr = new Object[inputArray.length - 1];
32
+        int count = 0;
33
+        for (int i = 0; i < inputArray.length; i++) {
34
+            if (i != index) {
35
+                newArr[count] = inputArray[i];
36
+                count++;
37
+            }
38
+        }
39
+        return (I[]) newArr;
40
+
41
+    }
42
+
43
+    public I[] remove1(I element){
44
+        int count = 0;
45
+        for(int i = 0; i<inputArray.length; i++) {
46
+            if (inputArray[i].equals(element)) {
47
+                count++;
48
+            }
49
+        }
50
+        I[] newArr = Arrays.copyOf(inputArray, inputArray.length-count);
51
+        int counter = 0;
52
+        for (int i = 0; i < inputArray.length; i++) {
53
+            if(!inputArray[i].equals(element)) {
54
+                newArr[counter] = inputArray[i];
55
+                 counter++;
56
+            }
57
+        }
58
+        return newArr;
59
+    }
60
+
61
+    public I[] set(Integer index, I replace){
62
+        for(int i = 0; i < inputArray.length; i++) {
63
+            if (i == index) inputArray[i] = replace;
64
+        }
65
+        System.out.println(inputArray);
66
+        return inputArray;
67
+    }
68
+
69
+    public I[] clear(){
70
+        return Arrays.copyOf(inputArray, 0);
71
+    }
72
+
73
+    public boolean isEmpty(){
74
+        boolean empty = false;
75
+        if(inputArray.length == 0) empty = true;
76
+        return empty;
77
+    }
78
+
79
+    public boolean contains(I element){
80
+        boolean contains = false;
81
+        for(I i : inputArray) {
82
+            if (i == element)
83
+                contains = true;
84
+        }
85
+
86
+        return contains;
87
+    }
88
+
89
+
90
+
91
+
92
+
93
+}

+ 2
- 0
src/main/java/MyMap.java Bestand weergeven

@@ -0,0 +1,2 @@
1
+public class MyMap {
2
+}

+ 151
- 0
src/main/java/MySet.java Bestand weergeven

@@ -0,0 +1,151 @@
1
+import java.util.Arrays;
2
+import java.util.Comparator;
3
+
4
+public class MySet<T> {
5
+
6
+    private T[] inputArray;
7
+    private T value;
8
+
9
+    public MySet() {
10
+    }
11
+
12
+    public MySet(T value) {
13
+        this.value = value;
14
+    }
15
+
16
+    public MySet(T[] inputArray) {
17
+        this.inputArray = inputArray;
18
+    }
19
+
20
+    public T[] add(T add) {
21
+        Object[] newArr = new Object[inputArray.length + 1];
22
+        System.arraycopy(inputArray, 0, newArr, 0, inputArray.length);
23
+        newArr[newArr.length - 1] = add;
24
+
25
+        inputArray = (T[]) newArr;
26
+        return inputArray;
27
+    }
28
+
29
+    public T[] addAll(T[] newArray) {
30
+        for (int i = 0; i < inputArray.length; i++) {
31
+            newArray[i] = inputArray[i];
32
+        }
33
+        return newArray;
34
+    }
35
+
36
+    public T[] clear() {
37
+        return Arrays.copyOf(inputArray, 0);
38
+
39
+    }
40
+
41
+    public boolean contains(T value) {
42
+        boolean contains = false;
43
+        for (T i : inputArray) {
44
+            if (i == value)
45
+                contains = true;
46
+        }
47
+
48
+        return contains;
49
+
50
+    }
51
+
52
+    public boolean containsAll(T[] newArray) {
53
+        boolean contain = false;
54
+        int count = 0;
55
+        for (T i : inputArray) {
56
+            for (T x : newArray) {
57
+                if (i == x) ;
58
+                count++;
59
+            }
60
+        }
61
+        if (count == inputArray.length) contain = true;
62
+
63
+        return contain;
64
+    }
65
+
66
+    public boolean equals(T[] array1, T[] array2) {
67
+        boolean equals = false;
68
+        if (array1.length == array2.length) {
69
+            equals = true;
70
+        }
71
+        System.out.println(equals);
72
+
73
+        return equals;
74
+
75
+    }
76
+
77
+    public boolean equals(T[] array) {
78
+        boolean equals = false;
79
+        for (T t : inputArray) {
80
+            for (T i : array) {
81
+                if (t == i) {
82
+                    equals = true;
83
+                }
84
+            }
85
+        }
86
+        System.out.println(equals);
87
+        return equals;
88
+    }
89
+
90
+    public Integer getHash(T[] array) {
91
+        return array.hashCode();
92
+    }
93
+
94
+    public boolean isEmpty() {
95
+        boolean empty = false;
96
+        if (inputArray.length == 0) empty = true;
97
+        return empty;
98
+    }
99
+
100
+    public T[] remove(T element) {
101
+        int count = 0;
102
+        boolean remove = false;
103
+        for (int i = 0; i < inputArray.length; i++) {
104
+            if (inputArray[i].equals(element)) {
105
+                count++;
106
+            }
107
+        }
108
+        T[] newArr = Arrays.copyOf(inputArray, inputArray.length - count);
109
+        int counter = 0;
110
+        for (int i = 0; i < inputArray.length; i++) {
111
+            if (!inputArray[i].equals(element)) {
112
+                newArr[counter] = inputArray[i];
113
+                counter++;
114
+                remove = true;
115
+            }
116
+        }
117
+        return newArr;
118
+    }
119
+
120
+    public T[] removeAll() {
121
+        return Arrays.copyOf(inputArray, 0);
122
+    }
123
+
124
+    public Integer size() {
125
+        return inputArray.length;
126
+    }
127
+
128
+
129
+    public String[] toArray() {
130
+
131
+        return value.toString().split("");
132
+    }
133
+
134
+    public boolean retainAll(T[] array) {
135
+        T[] newArr = (T[]) new Object[array.length];
136
+        boolean retain = false;
137
+
138
+        for (T t : array) {
139
+            for (T i : inputArray) {
140
+                if (t == i) {
141
+
142
+                    System.arraycopy(array, 0, newArr, 0, array.length);
143
+                    retain = true;
144
+                }
145
+            }
146
+
147
+        }
148
+        return retain;
149
+    }
150
+}
151
+

+ 262
- 0
src/test/java/MyArrayListTest.java Bestand weergeven

@@ -0,0 +1,262 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import static org.junit.Assert.*;
5
+
6
+public class MyArrayListTest {
7
+
8
+
9
+    @Test
10
+    public void testAddInteger() {
11
+        Integer[] inputArray = new Integer[]{1, 2, 3,  4, 5, 6, 7, 8};
12
+
13
+        Integer add = 9;
14
+        Integer [] expected = new Integer[]{1, 2, 3,  4, 5, 6, 7, 8, add};
15
+
16
+        MyArrayList myArrayList = new MyArrayList(inputArray);
17
+        Object [] actual =  myArrayList.add(add);
18
+
19
+
20
+        assertArrayEquals(expected, actual);
21
+    }
22
+
23
+    @Test
24
+    public void testAddString() {
25
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
26
+
27
+        String add  = "Calabassas Jones";
28
+        String [] expected = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy",  add};
29
+
30
+        MyArrayList myArrayList = new MyArrayList(inputArray);
31
+        Object [] actual =  myArrayList.add(add);
32
+
33
+
34
+        assertArrayEquals(expected, actual);
35
+    }
36
+
37
+    @Test
38
+    public void testAddObject() {
39
+        Object[] inputArray = new Object[]{"we used", 2, "fuss", "wh", 4, "n the landlord", "diss", 3, "d us"};
40
+
41
+        Object add = "NO HEAT";
42
+        Object [] expected = new Object[]{"we used", 2, "fuss", "wh", 4, "n the landlord", "diss", 3, "d us", add};
43
+
44
+        MyArrayList myArrayList = new MyArrayList(inputArray);
45
+        Object [] actual =  myArrayList.add(add);
46
+
47
+
48
+        assertArrayEquals(expected, actual);
49
+    }
50
+
51
+    @Test
52
+    public void testGetSpecifiedInteger(){
53
+        Integer expected = 45;
54
+        Integer[] inputArray = new Integer[] {45, 9, 19, expected, 85, 34, 6};
55
+
56
+        MyArrayList myArrayList = new MyArrayList(inputArray);
57
+        Object actual = myArrayList.get(expected);
58
+
59
+        assertEquals(expected, actual);
60
+    }
61
+
62
+    @Test
63
+    public void testGetSpecifiedString(){
64
+        String expected = "Calabassas Jones";
65
+        String[] inputArray = new String[] {"James Talbot", "2 Phones Jones", "Jimmy BeepBop", expected, "Mike Lawwrryyy"};
66
+
67
+        MyArrayList myArrayList = new MyArrayList(inputArray);
68
+        Object actual = myArrayList.get(expected);
69
+
70
+        assertEquals(expected, actual);
71
+    }
72
+
73
+    @Test
74
+    public void testGetSpecifiedObject(){
75
+        Object expected = 65;
76
+        Object[] inputArray = new Object[] {"$8,247.00", 34, "2 Phones Jones", expected, "Mike Lawwrryyy"};
77
+
78
+        MyArrayList myArrayList = new MyArrayList(inputArray);
79
+        Object actual = myArrayList.get(expected);
80
+
81
+        assertEquals(expected, actual);
82
+    }
83
+
84
+
85
+    @Test
86
+    public void testRemoveIntegerAtIndex(){
87
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
88
+        Integer index = 5;
89
+
90
+        Integer[] expected = new Integer[]{1, 2,  3, 4, 5, 7, 8};
91
+        MyArrayList myArrayList = new MyArrayList(inputArray);
92
+
93
+        Object[] actual = myArrayList.remove(index);
94
+
95
+        assertArrayEquals(expected, actual);
96
+    }
97
+
98
+    @Test
99
+    public void testRemoveStringAtIndex(){
100
+        String[] inputArray = new String[]{"waka", "flocka", "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
101
+        Integer index = 3;
102
+
103
+        String[] expected = new String[]{"waka", "flocka", "Pikachu", "Shabba", "Tom Hanks in Big"};
104
+
105
+
106
+        MyArrayList myArrayList = new MyArrayList(inputArray);
107
+        Object[] actual = myArrayList.remove(index);
108
+
109
+        assertArrayEquals(expected, actual);
110
+    }
111
+
112
+    @Test
113
+    public void testRemoveSpecifiedInteger(){
114
+        Integer numberToRemove = 4;
115
+
116
+        Integer[] inputArray = new Integer[]{1, numberToRemove, 3, numberToRemove, 5, 6, 7, 8};
117
+        Integer[] expected  = new Integer[]{1, 3, 5, 6, 7, 8};
118
+
119
+        MyArrayList myArrayList = new MyArrayList(inputArray);
120
+        Object[] actual = myArrayList.remove1(numberToRemove);
121
+
122
+        assertArrayEquals(expected, actual);
123
+    }
124
+
125
+    @Test
126
+    public void testRemoveSpecifiedString(){
127
+        String stringToRemove = "bong bong";
128
+
129
+        String[] inputArray = new String[]{"waka", stringToRemove, "flocka", stringToRemove, "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
130
+        String[] expected = new String[]{"waka", "flocka", "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
131
+
132
+
133
+        MyArrayList myArrayList = new MyArrayList(inputArray);
134
+        Object[] actual = myArrayList.remove1(stringToRemove);
135
+
136
+        assertArrayEquals(expected, actual);
137
+    }
138
+
139
+
140
+    @Test
141
+    public void testSetInteger(){
142
+        Integer index = 5;
143
+        Integer replace = 646;
144
+
145
+        Integer[] inputArray = new Integer[]{1, 2, 3,  4, 5, 6, 7, 8};
146
+        Integer[] expected = new Integer[] {1, 2, 3, 4, 5, replace, 7, 8};
147
+
148
+        MyArrayList myArrayList = new MyArrayList(inputArray);
149
+        Object[] actual = myArrayList.set(index, replace);
150
+
151
+        assertArrayEquals(expected, actual);
152
+    }
153
+
154
+    @Test
155
+    public void testSetString(){
156
+        Integer index = 2;
157
+        String replace = "Brooklyn Baby Bombada";
158
+
159
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
160
+        String[] expected = new String[]{"James Talbot", "2 Phones Jones", replace, "Mike Lawwrryyy"};
161
+
162
+        MyArrayList myArrayList = new MyArrayList(inputArray);
163
+        Object[] actual = myArrayList.set(index, replace);
164
+
165
+        assertArrayEquals(expected, actual);
166
+    }
167
+
168
+    @Test
169
+    public void testSetObject(){
170
+        Integer index = 4;
171
+        Object replace = "Brooklyn Baby Bombada";
172
+
173
+        Object[] inputArray = new Object[]{'c', "2 Phones Jones", 669, "Aquemini",  "Jimmy BeepBop", "Mike Lawwrryyy"};
174
+        Object[] expected = new Object[]{ 'c' , "2 Phones Jones", 669, "Aquemini", replace, "Mike Lawwrryyy"};
175
+
176
+        MyArrayList myArrayList = new MyArrayList(inputArray);
177
+        Object[] actual = myArrayList.set(index, replace);
178
+
179
+        assertArrayEquals(expected, actual);
180
+    }
181
+
182
+    @Test
183
+    public void testClearIntegerArray(){
184
+        Integer[] inputArray = new Integer[]{1, 2, 3,  4, 5, 6, 7, 8};
185
+
186
+        Integer[] expected = new Integer[0];
187
+
188
+        MyArrayList myArrayList = new MyArrayList(inputArray);
189
+        Object[] actual = myArrayList.clear();
190
+
191
+        assertArrayEquals(expected, actual);
192
+    }
193
+
194
+    @Test
195
+    public void testClearStringArray(){
196
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
197
+
198
+        String[] expected = new String[0];
199
+
200
+        MyArrayList myArrayList = new MyArrayList(inputArray);
201
+        Object[] actual = myArrayList.clear();
202
+
203
+        assertArrayEquals(expected, actual);
204
+
205
+    }
206
+
207
+    @Test
208
+    public void testIsEmptyInteger(){
209
+        Integer[] inputArray = new Integer[]{1, 2, 3,  4, 5, 6, 7, 8};
210
+        Integer[] input2 = new Integer[0];
211
+
212
+        MyArrayList myArrayList = new MyArrayList(inputArray);
213
+        MyArrayList myArrayList2 = new MyArrayList(input2);
214
+
215
+
216
+        assertFalse(myArrayList.isEmpty());
217
+        assertTrue(myArrayList2.isEmpty());
218
+    }
219
+
220
+    @Test
221
+    public void testIsEmptyString(){
222
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
223
+        String[] input2 = new String[0];
224
+
225
+        MyArrayList myArrayList = new MyArrayList(inputArray);
226
+        MyArrayList myArrayList2 = new MyArrayList(input2);
227
+
228
+
229
+        assertFalse(myArrayList.isEmpty());
230
+        assertTrue(myArrayList2.isEmpty());
231
+    }
232
+
233
+    @Test
234
+    public void testContainsInteger(){
235
+        Integer value = 7;
236
+
237
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 8};
238
+        Integer[] input2 = new Integer[]{1, 2, value, 4, 5, 6, value, 8};
239
+
240
+        MyArrayList myArrayList = new MyArrayList(inputArray);
241
+        MyArrayList myArrayList2 = new MyArrayList(input2);
242
+
243
+
244
+        assertFalse(myArrayList.contains(value));
245
+        assertTrue(myArrayList2.contains(value));
246
+    }
247
+
248
+    @Test
249
+    public void testContainsString(){
250
+        String value = "Tone Loc";
251
+
252
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
253
+        String[] inputArray2 = new String[]{"James Talbot", value, "2 Phones Jones", "Jimmy BeepBop", value, "Mike Lawwrryyy"};
254
+
255
+        MyArrayList myArrayList = new MyArrayList(inputArray);
256
+        MyArrayList myArrayList2 = new MyArrayList(inputArray2);
257
+
258
+
259
+        assertFalse(myArrayList.contains(value));
260
+        assertTrue(myArrayList2.contains(value));
261
+    }
262
+}

+ 5
- 0
src/test/java/MyMapTest.java Bestand weergeven

@@ -0,0 +1,5 @@
1
+import static org.junit.Assert.*;
2
+
3
+public class MyMapTest {
4
+
5
+}

+ 329
- 0
src/test/java/MySetTest.java Bestand weergeven

@@ -0,0 +1,329 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import static org.junit.Assert.*;
5
+
6
+public class MySetTest {
7
+
8
+    @Test
9
+    public void testAddInteger() {
10
+        Integer add = 89;
11
+
12
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
13
+        Integer[] expected = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, add};
14
+
15
+        MySet mySet = new MySet(inputArray);
16
+        Object[] actual = mySet.add(add);
17
+
18
+
19
+        assertArrayEquals(expected, actual);
20
+    }
21
+
22
+    @Test
23
+    public void testAddString() {
24
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
25
+
26
+        String add = "Calabassas Jones";
27
+        String[] expected = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy", add};
28
+
29
+        MySet mySet = new MySet(inputArray);
30
+        Object[] actual = mySet.add(add);
31
+
32
+
33
+        assertArrayEquals(expected, actual);
34
+    }
35
+
36
+    @Test
37
+    public void testAddAllInteger() {
38
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
39
+        Integer[] newArray = new Integer[inputArray.length];
40
+        Integer[] expected = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
41
+
42
+        MySet mySet = new MySet(inputArray);
43
+        Object[] actual = mySet.addAll(newArray);
44
+
45
+
46
+        assertArrayEquals(expected, actual);
47
+    }
48
+
49
+    @Test
50
+    public void testAddAllString() {
51
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
52
+        String[] newArray = new String[inputArray.length];
53
+        String[] expected = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
54
+
55
+        MySet mySet = new MySet(inputArray);
56
+        Object[] actual = mySet.addAll(newArray);
57
+
58
+
59
+        assertArrayEquals(expected, actual);
60
+    }
61
+
62
+    @Test
63
+    public void testClearInteger() {
64
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
65
+
66
+        Integer[] expected = new Integer[0];
67
+
68
+        MySet mySet = new MySet(inputArray);
69
+        Object[] actual = mySet.clear();
70
+
71
+        assertArrayEquals(expected, actual);
72
+        //removes all elements from set
73
+    }
74
+
75
+    @Test
76
+    public void testClearString() {
77
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
78
+
79
+        String[] expected = new String[0];
80
+
81
+        MySet mySet = new MySet(inputArray);
82
+        Object[] actual = mySet.clear();
83
+
84
+        assertArrayEquals(expected, actual);
85
+    }
86
+
87
+
88
+    @Test
89
+    public void testContainsInteger() {
90
+        Integer value = 7;
91
+
92
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 8};
93
+        Integer[] inputArray2 = new Integer[]{1, 2, value, 4, 5, 6, value, 8};
94
+
95
+        MySet mySet = new MySet(inputArray);
96
+        MySet mySet1 = new MySet(inputArray2);
97
+
98
+
99
+        assertFalse(mySet.contains(value));
100
+        assertTrue(mySet1.contains(value));
101
+    }
102
+    @Test
103
+    public void testContainsString() {
104
+        String value = "Jimmy BeepBop";
105
+
106
+        String[]inputArray = new String[]{"James Talbot", "2 Phones Jones", "Mike Lawwrryyy"};
107
+        String[]inputArray2 = new String[]{"waka", "flocka", "Pikachu", value, "Shabba", "Tom Hanks in Big"};
108
+
109
+        MySet mySet = new MySet(inputArray);
110
+        MySet mySet1 = new MySet(inputArray2);
111
+
112
+        assertFalse(mySet.contains(value));
113
+        assertTrue(mySet1.contains(value));
114
+    }
115
+
116
+    @Test
117
+    public void testContainsAllInt() {
118
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 8};
119
+
120
+        Integer[] inputArray2 = new Integer[]{1, 2, 3, 4, 5, 6, 8};
121
+        Integer[] inputArray3 = new Integer[]{1, 2, 3, 6, 5, 6, 8};
122
+
123
+        MySet mySet = new MySet(inputArray);
124
+
125
+        assertTrue(mySet.containsAll(inputArray2));
126
+        assertFalse(mySet.containsAll(inputArray3));
127
+
128
+    }
129
+//    @Test
130
+//    public void testContainsAllString() {
131
+//        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
132
+//
133
+//        String[] inputArray2 = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
134
+//        String[] inputArray3 = new String[]{"Makiavelli", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
135
+//
136
+//        MySet mySet = new MySet(inputArray);
137
+//
138
+//
139
+//        assertTrue(mySet.containsAll(inputArray2));
140
+//        assertFalse(mySet.containsAll(inputArray3));
141
+//    }
142
+
143
+    @Test
144
+    public void testEqualsArrLengthInt() {
145
+        Integer[] inputArray = new Integer[8];
146
+        Integer[] inputArray2 = new Integer[8];
147
+        Integer[] inputArray3 = new Integer[4];
148
+
149
+        MySet mySet = new MySet();
150
+
151
+        assertTrue(mySet.equals(inputArray, inputArray2));
152
+        assertFalse(mySet.equals(inputArray, inputArray3));
153
+        assertFalse(mySet.equals(inputArray2, inputArray3));
154
+    }
155
+    @Test
156
+    public void testEqualsArrLengthString() {
157
+        String[] inputArray = new String[8];
158
+        String[] inputArray2 = new String[8];
159
+        String[] inputArray3 = new String[4];
160
+
161
+        MySet mySet = new MySet();
162
+
163
+        assertTrue(mySet.equals(inputArray, inputArray2));
164
+        assertFalse(mySet.equals(inputArray, inputArray3));
165
+        assertFalse(mySet.equals(inputArray2, inputArray3));
166
+    }
167
+
168
+    @Test
169
+    public void testHashCodeInt() {
170
+        Integer[] inputArray = new Integer[]{1, 5, 3, 4, 5, 6, 8};
171
+
172
+        Integer expected = inputArray.hashCode();
173
+
174
+        MySet mySet = new MySet(inputArray);
175
+        Integer actual = mySet.getHash(inputArray);
176
+
177
+        assertEquals(expected, actual);
178
+    }
179
+    @Test
180
+    public void testHashCodeString() {
181
+        String[]inputArray = new String[]{"James Talbot", "2 Phones Jones", "Mike Lawwrryyy"};
182
+
183
+        Integer expected = inputArray.hashCode();
184
+
185
+        MySet mySet = new MySet(inputArray);
186
+        Integer actual = mySet.getHash(inputArray);
187
+
188
+        assertEquals(expected, actual);
189
+    }
190
+
191
+    @Test
192
+    public void testIsEmptyInteger() {
193
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
194
+        Integer[] inputArray2 = new Integer[0];
195
+
196
+        MySet mySet = new MySet(inputArray);
197
+        MySet mySet2 = new MySet(inputArray2);
198
+
199
+
200
+        assertFalse(mySet.isEmpty());
201
+        assertTrue(mySet2.isEmpty());
202
+    }
203
+    @Test
204
+    public void testIsEmptyString() {
205
+        String[] inputArray = new String[]{"James Talbot", "2 Phones Jones", "Jimmy BeepBop", "Mike Lawwrryyy"};
206
+        String[] inputArray2 = new String[0];
207
+
208
+        MySet mySet = new MySet(inputArray);
209
+        MySet mySet2 = new MySet(inputArray2);
210
+
211
+
212
+        assertFalse(mySet.isEmpty());
213
+        assertTrue(mySet2.isEmpty());
214
+    }
215
+
216
+    @Test
217
+    public void testRemoveInteger() {
218
+        Integer numberToRemove = 4;
219
+
220
+        Integer[] inputArray = new Integer[]{1, numberToRemove, 3, numberToRemove, 5, 6, 7, 8};
221
+        Integer[] expected = new Integer[]{1, 3, 5, 6, 7, 8};
222
+
223
+        MySet mySet = new MySet(inputArray);
224
+        Object[] actual = mySet.remove(numberToRemove);
225
+
226
+        assertArrayEquals(expected, actual);
227
+    }
228
+    @Test
229
+    public void testRemoveString() {
230
+        String stringToRemove = "bong bong";
231
+
232
+        String[] inputArray = new String[]{"waka", stringToRemove, "flocka", stringToRemove, "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
233
+        String[] expected = new String[]{"waka", "flocka", "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
234
+
235
+
236
+        MySet mySet = new MySet(inputArray);
237
+        Object[] actual = mySet.remove(stringToRemove);
238
+
239
+        assertArrayEquals(expected, actual);
240
+
241
+    }
242
+    @Test
243
+    public void testRemoveAllInt() {
244
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
245
+
246
+        Integer[] expected = new Integer[0];
247
+
248
+        MySet mySet = new MySet(inputArray);
249
+        Object[] actual = mySet.removeAll();
250
+
251
+        assertArrayEquals(expected, actual);
252
+    }
253
+    @Test
254
+    public void testRemoveAllString() {
255
+        String[] inputArray  = new String[]{"waka", "flocka", "Pikachu", "Bushmaster", "Shabba", "Tom Hanks in Big"};
256
+
257
+        String[] expected = new String[0];
258
+
259
+        MySet mySet = new MySet(inputArray);
260
+        Object[] actual = mySet.removeAll();
261
+
262
+        assertArrayEquals(expected, actual);
263
+    }
264
+
265
+    @Test
266
+    public void testRetainAllInteger() {
267
+        Integer[] array = new Integer[]{4, 5, 6};
268
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
269
+
270
+        Integer[] expected = new Integer[]{4, 5, 6};
271
+
272
+        MySet mySet = new MySet(array);
273
+
274
+        assertTrue(mySet.retainAll(inputArray));
275
+    }
276
+    @Test
277
+    public void testRetainAllString() {
278
+        String[] array = new String[]{"shut em down", "open up shop", "whoah"};
279
+        String[] inputArray = new String[]{"stop", "drop", "shut em down", "open up shop", "whoah", "nooo"};
280
+
281
+        String[] expected = new String[]{"shut em down", "open up shop", "whoah"};
282
+        MySet mySet = new MySet(array);
283
+
284
+        assertTrue(mySet.retainAll(inputArray));
285
+    }
286
+
287
+    @Test
288
+    public void testSizeInt() {
289
+        Integer[] inputArray = new Integer[]{1, 2, 3, 4, 5, 6, 7, 8};
290
+        Integer expected = inputArray.length;
291
+
292
+        MySet mySet = new MySet(inputArray);
293
+        Integer actual = mySet.size();
294
+
295
+        assertEquals(expected, actual);
296
+    }
297
+    @Test
298
+    public void testSizeString() {
299
+        String[] inputArray = new String[]{"stop", "drop", "shut em down", "open up shop", "whoah", "nooo"};
300
+        Integer expected = inputArray.length;
301
+
302
+        MySet mySet = new MySet(inputArray);
303
+        Integer actual = mySet.size();
304
+
305
+        assertEquals(expected, actual);
306
+    }
307
+
308
+    @Test
309
+    public void testToArrayInt() {
310
+        Integer bigAssInteger = 546931957;
311
+
312
+        String[] expected = new String[]{"5", "4", "6", "9", "3", "1", "9", "5", "7"};
313
+        MySet mySet = new MySet(bigAssInteger);
314
+        String[] actual = mySet.toArray();
315
+
316
+        assertArrayEquals(expected, actual);
317
+    }
318
+    @Test
319
+    public void testToArrayString() {
320
+        String bigAssString = "I ain't a killer but don't push me. Revenge is but the sweetest joy next to getting..";
321
+
322
+        String[] expected = bigAssString.split("");
323
+        MySet mySet = new MySet(bigAssString);
324
+        String[] actual = mySet.toArray();
325
+
326
+        assertArrayEquals(expected, actual);
327
+    }
328
+
329
+}