Brandon Defrancis 6 年 前
コミット
c5d1b3320e

+ 1
- 0
.idea/.name ファイルの表示

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

+ 16
- 0
.idea/compiler.xml ファイルの表示

@@ -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 ファイルの表示

@@ -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 ファイルの表示

@@ -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>

+ 13
- 0
.idea/misc.xml ファイルの表示

@@ -0,0 +1,13 @@
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="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
11
+    <output url="file://$PROJECT_DIR$/classes" />
12
+  </component>
13
+</project>

+ 8
- 0
.idea/modules.xml ファイルの表示

@@ -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 ファイルの表示

@@ -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>

+ 530
- 0
.idea/workspace.xml ファイルの表示

@@ -0,0 +1,530 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="5c2b4848-5a60-4cbc-beae-b4a272fa9ac0" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/src/main/java/MyMap.java" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/src/main/java/MySet.java" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/src/test/java/MyMapTest.java" afterDir="false" />
13
+      <change afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/src/main/java/.deleteme" beforeDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/src/test/java/.deleteme" beforeDir="false" />
17
+    </list>
18
+    <ignored path="$PROJECT_DIR$/target/" />
19
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
20
+    <option name="SHOW_DIALOG" value="false" />
21
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
22
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
23
+    <option name="LAST_RESOLUTION" value="IGNORE" />
24
+  </component>
25
+  <component name="FUSProjectUsageTrigger">
26
+    <session id="1462628262">
27
+      <usages-collector id="statistics.lifecycle.project">
28
+        <counts>
29
+          <entry key="project.closed" value="4" />
30
+          <entry key="project.open.time.1" value="2" />
31
+          <entry key="project.open.time.10" value="1" />
32
+          <entry key="project.open.time.2" value="1" />
33
+          <entry key="project.opened" value="4" />
34
+        </counts>
35
+      </usages-collector>
36
+      <usages-collector id="statistics.file.extensions.open">
37
+        <counts>
38
+          <entry key="iml" value="1" />
39
+          <entry key="java" value="13" />
40
+          <entry key="xml" value="1" />
41
+        </counts>
42
+      </usages-collector>
43
+      <usages-collector id="statistics.file.types.open">
44
+        <counts>
45
+          <entry key="IDEA_MODULE" value="1" />
46
+          <entry key="JAVA" value="13" />
47
+          <entry key="XML" value="1" />
48
+        </counts>
49
+      </usages-collector>
50
+      <usages-collector id="statistics.file.extensions.edit">
51
+        <counts>
52
+          <entry key="java" value="3954" />
53
+          <entry key="xml" value="3" />
54
+        </counts>
55
+      </usages-collector>
56
+      <usages-collector id="statistics.file.types.edit">
57
+        <counts>
58
+          <entry key="JAVA" value="3954" />
59
+          <entry key="XML" value="3" />
60
+        </counts>
61
+      </usages-collector>
62
+      <usages-collector id="statistics.vcs.git.usages" />
63
+      <usages-collector id="statistics.spring.boot.mvc.usages" />
64
+      <usages-collector id="statistics.js.language.service.starts" />
65
+      <usages-collector id="statistics.spring.boot.run.usages" />
66
+    </session>
67
+  </component>
68
+  <component name="FileEditorManager">
69
+    <splitter split-orientation="horizontal" split-proportion="0.51785713">
70
+      <split-first>
71
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
72
+          <file pinned="false" current-in-tab="false">
73
+            <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
74
+              <provider selected="true" editor-type-id="text-editor">
75
+                <state relative-caret-position="341">
76
+                  <caret line="43" lean-forward="true" selection-start-line="43" selection-end-line="43" />
77
+                  <folding>
78
+                    <element signature="e#81#82#0" expanded="true" />
79
+                    <element signature="e#130#131#0" expanded="true" />
80
+                    <element signature="e#158#159#0" expanded="true" />
81
+                    <element signature="e#204#205#0" expanded="true" />
82
+                    <element signature="e#1074#1075#0" expanded="true" />
83
+                    <element signature="e#1104#1105#0" expanded="true" />
84
+                  </folding>
85
+                </state>
86
+              </provider>
87
+            </entry>
88
+          </file>
89
+          <file pinned="false" current-in-tab="false">
90
+            <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
91
+              <provider selected="true" editor-type-id="text-editor">
92
+                <state relative-caret-position="446">
93
+                  <caret line="39" column="28" lean-forward="true" selection-start-line="39" selection-start-column="28" selection-end-line="39" selection-end-column="28" />
94
+                  <folding>
95
+                    <element signature="e#521#522#0" expanded="true" />
96
+                    <element signature="e#555#556#0" expanded="true" />
97
+                    <element signature="e#581#582#0" expanded="true" />
98
+                    <element signature="e#615#616#0" expanded="true" />
99
+                    <element signature="e#837#838#0" expanded="true" />
100
+                    <element signature="e#879#880#0" expanded="true" />
101
+                  </folding>
102
+                </state>
103
+              </provider>
104
+            </entry>
105
+          </file>
106
+          <file pinned="false" current-in-tab="true">
107
+            <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
108
+              <provider selected="true" editor-type-id="text-editor">
109
+                <state relative-caret-position="615">
110
+                  <caret line="41" column="5" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
111
+                  <folding>
112
+                    <element signature="e#732#733#0" expanded="true" />
113
+                    <element signature="e#765#766#0" expanded="true" />
114
+                  </folding>
115
+                </state>
116
+              </provider>
117
+            </entry>
118
+          </file>
119
+        </leaf>
120
+      </split-first>
121
+      <split-second>
122
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
123
+          <file pinned="false" current-in-tab="false">
124
+            <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
125
+              <provider selected="true" editor-type-id="text-editor">
126
+                <state relative-caret-position="1780">
127
+                  <caret line="132" column="14" lean-forward="true" selection-start-line="132" selection-start-column="14" selection-end-line="132" selection-end-column="14" />
128
+                  <folding>
129
+                    <element signature="imports" expanded="true" />
130
+                  </folding>
131
+                </state>
132
+              </provider>
133
+            </entry>
134
+          </file>
135
+          <file pinned="false" current-in-tab="true">
136
+            <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
137
+              <provider selected="true" editor-type-id="text-editor">
138
+                <state relative-caret-position="1875">
139
+                  <caret line="125" column="8" selection-start-line="125" selection-start-column="8" selection-end-line="125" selection-end-column="8" />
140
+                  <folding>
141
+                    <element signature="imports" expanded="true" />
142
+                  </folding>
143
+                </state>
144
+              </provider>
145
+            </entry>
146
+          </file>
147
+        </leaf>
148
+      </split-second>
149
+    </splitter>
150
+  </component>
151
+  <component name="FileTemplateManagerImpl">
152
+    <option name="RECENT_TEMPLATES">
153
+      <list>
154
+        <option value="Class" />
155
+        <option value="JUnit4 Test Class" />
156
+      </list>
157
+    </option>
158
+  </component>
159
+  <component name="FindInProjectRecents">
160
+    <findStrings>
161
+      <find>Test</find>
162
+      <find>myArrayList</find>
163
+      <find>MyArrayList</find>
164
+      <find>T</find>
165
+    </findStrings>
166
+    <replaceStrings>
167
+      <replace>meySet</replace>
168
+      <replace>MySet</replace>
169
+      <replace>mySet</replace>
170
+      <replace>E</replace>
171
+    </replaceStrings>
172
+  </component>
173
+  <component name="Git.Settings">
174
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
175
+  </component>
176
+  <component name="IdeDocumentHistory">
177
+    <option name="CHANGED_PATHS">
178
+      <list>
179
+        <option value="$PROJECT_DIR$/pom.xml" />
180
+        <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
181
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
182
+        <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
183
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
184
+        <option value="$PROJECT_DIR$/src/test/java/MyMapTest.java" />
185
+        <option value="$PROJECT_DIR$/src/main/java/MyMap.java" />
186
+      </list>
187
+    </option>
188
+  </component>
189
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
190
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
191
+  <component name="JsGulpfileManager">
192
+    <detection-done>true</detection-done>
193
+    <sorting>DEFINITION_ORDER</sorting>
194
+  </component>
195
+  <component name="MavenImportPreferences">
196
+    <option name="importingSettings">
197
+      <MavenImportingSettings>
198
+        <option name="importAutomatically" value="true" />
199
+      </MavenImportingSettings>
200
+    </option>
201
+  </component>
202
+  <component name="ProjectFrameBounds">
203
+    <option name="x" value="-145" />
204
+    <option name="y" value="-1001" />
205
+    <option name="width" value="1920" />
206
+    <option name="height" value="1001" />
207
+  </component>
208
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
209
+  <component name="ProjectView">
210
+    <navigator proportions="" version="1">
211
+      <foldersAlwaysOnTop value="true" />
212
+    </navigator>
213
+    <panes>
214
+      <pane id="ProjectPane">
215
+        <subPane>
216
+          <expand>
217
+            <path>
218
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
219
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
220
+            </path>
221
+            <path>
222
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
223
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
224
+              <item name="src" type="462c0819:PsiDirectoryNode" />
225
+            </path>
226
+            <path>
227
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
228
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
229
+              <item name="src" type="462c0819:PsiDirectoryNode" />
230
+              <item name="main" type="462c0819:PsiDirectoryNode" />
231
+            </path>
232
+            <path>
233
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
234
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
235
+              <item name="src" type="462c0819:PsiDirectoryNode" />
236
+              <item name="main" type="462c0819:PsiDirectoryNode" />
237
+              <item name="java" type="462c0819:PsiDirectoryNode" />
238
+            </path>
239
+            <path>
240
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
241
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
242
+              <item name="src" type="462c0819:PsiDirectoryNode" />
243
+              <item name="test" type="462c0819:PsiDirectoryNode" />
244
+            </path>
245
+            <path>
246
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
247
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
248
+              <item name="src" type="462c0819:PsiDirectoryNode" />
249
+              <item name="test" type="462c0819:PsiDirectoryNode" />
250
+              <item name="java" type="462c0819:PsiDirectoryNode" />
251
+            </path>
252
+          </expand>
253
+          <select />
254
+        </subPane>
255
+      </pane>
256
+      <pane id="Scope" />
257
+      <pane id="PackagesPane" />
258
+    </panes>
259
+  </component>
260
+  <component name="PropertiesComponent">
261
+    <property name="WebServerToolWindowFactoryState" value="false" />
262
+    <property name="aspect.path.notification.shown" value="true" />
263
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542651574171" />
264
+    <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
265
+    <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
266
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
267
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
268
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
269
+  </component>
270
+  <component name="RecentsManager">
271
+    <key name="CreateTestDialog.RecentsKey">
272
+      <recent name="" />
273
+    </key>
274
+    <key name="CreateTestDialog.Recents.Supers">
275
+      <recent name="" />
276
+    </key>
277
+  </component>
278
+  <component name="RunDashboard">
279
+    <option name="ruleStates">
280
+      <list>
281
+        <RuleState>
282
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
283
+        </RuleState>
284
+        <RuleState>
285
+          <option name="name" value="StatusDashboardGroupingRule" />
286
+        </RuleState>
287
+      </list>
288
+    </option>
289
+  </component>
290
+  <component name="RunManager" selected="JUnit.MyMapTest.keySetTest2">
291
+    <configuration name="MyMapTest.entrySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
292
+      <module name="generics" />
293
+      <option name="PACKAGE_NAME" value="" />
294
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
295
+      <option name="METHOD_NAME" value="entrySetTest" />
296
+      <option name="TEST_OBJECT" value="method" />
297
+      <method v="2">
298
+        <option name="Make" enabled="true" />
299
+      </method>
300
+    </configuration>
301
+    <configuration name="MyMapTest.entrySetTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
302
+      <module name="generics" />
303
+      <option name="PACKAGE_NAME" value="" />
304
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
305
+      <option name="METHOD_NAME" value="entrySetTest2" />
306
+      <option name="TEST_OBJECT" value="method" />
307
+      <method v="2">
308
+        <option name="Make" enabled="true" />
309
+      </method>
310
+    </configuration>
311
+    <configuration name="MyMapTest.keySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
312
+      <module name="generics" />
313
+      <option name="PACKAGE_NAME" value="" />
314
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
315
+      <option name="METHOD_NAME" value="keySetTest" />
316
+      <option name="TEST_OBJECT" value="method" />
317
+      <method v="2">
318
+        <option name="Make" enabled="true" />
319
+      </method>
320
+    </configuration>
321
+    <configuration name="MyMapTest.keySetTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
322
+      <module name="generics" />
323
+      <option name="PACKAGE_NAME" value="" />
324
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
325
+      <option name="METHOD_NAME" value="keySetTest2" />
326
+      <option name="TEST_OBJECT" value="method" />
327
+      <method v="2">
328
+        <option name="Make" enabled="true" />
329
+      </method>
330
+    </configuration>
331
+    <configuration name="MyMapTest.removeTest2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
332
+      <module name="generics" />
333
+      <option name="PACKAGE_NAME" value="" />
334
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
335
+      <option name="METHOD_NAME" value="removeTest2" />
336
+      <option name="TEST_OBJECT" value="method" />
337
+      <method v="2">
338
+        <option name="Make" enabled="true" />
339
+      </method>
340
+    </configuration>
341
+    <list>
342
+      <item itemvalue="JUnit.MyMapTest.removeTest2" />
343
+      <item itemvalue="JUnit.MyMapTest.keySetTest" />
344
+      <item itemvalue="JUnit.MyMapTest.entrySetTest" />
345
+      <item itemvalue="JUnit.MyMapTest.entrySetTest2" />
346
+      <item itemvalue="JUnit.MyMapTest.keySetTest2" />
347
+    </list>
348
+    <recent_temporary>
349
+      <list>
350
+        <item itemvalue="JUnit.MyMapTest.keySetTest2" />
351
+        <item itemvalue="JUnit.MyMapTest.entrySetTest2" />
352
+        <item itemvalue="JUnit.MyMapTest.entrySetTest" />
353
+        <item itemvalue="JUnit.MyMapTest.keySetTest" />
354
+        <item itemvalue="JUnit.MyMapTest.removeTest2" />
355
+      </list>
356
+    </recent_temporary>
357
+  </component>
358
+  <component name="SvnConfiguration">
359
+    <configuration />
360
+  </component>
361
+  <component name="TaskManager">
362
+    <task active="true" id="Default" summary="Default task">
363
+      <changelist id="5c2b4848-5a60-4cbc-beae-b4a272fa9ac0" name="Default Changelist" comment="" />
364
+      <created>1542312207044</created>
365
+      <option name="number" value="Default" />
366
+      <option name="presentableId" value="Default" />
367
+      <updated>1542312207044</updated>
368
+      <workItem from="1542312208702" duration="7965000" />
369
+      <workItem from="1542384609536" duration="166000" />
370
+      <workItem from="1542398346682" duration="3648000" />
371
+      <workItem from="1542633546492" duration="9549000" />
372
+    </task>
373
+    <servers />
374
+  </component>
375
+  <component name="TestHistory">
376
+    <history-entry file="MyMapTest_removeTest2 - 2018.11.19 at 12h 52m 39s.xml">
377
+      <configuration name="MyMapTest.removeTest2" configurationId="JUnit" />
378
+    </history-entry>
379
+    <history-entry file="MyMapTest_keySetTest - 2018.11.19 at 12h 58m 03s.xml">
380
+      <configuration name="MyMapTest.keySetTest" configurationId="JUnit" />
381
+    </history-entry>
382
+    <history-entry file="MyMapTest_keySetTest - 2018.11.19 at 12h 58m 18s.xml">
383
+      <configuration name="MyMapTest.keySetTest" configurationId="JUnit" />
384
+    </history-entry>
385
+    <history-entry file="MyMapTest_keySetTest - 2018.11.19 at 12h 58m 45s.xml">
386
+      <configuration name="MyMapTest.keySetTest" configurationId="JUnit" />
387
+    </history-entry>
388
+    <history-entry file="MyMapTest_keySetTest - 2018.11.19 at 12h 58m 52s.xml">
389
+      <configuration name="MyMapTest.keySetTest" configurationId="JUnit" />
390
+    </history-entry>
391
+    <history-entry file="MyMapTest_keySetTest - 2018.11.19 at 13h 00m 11s.xml">
392
+      <configuration name="MyMapTest.keySetTest" configurationId="JUnit" />
393
+    </history-entry>
394
+    <history-entry file="MyMapTest_entrySetTest - 2018.11.19 at 13h 02m 04s.xml">
395
+      <configuration name="MyMapTest.entrySetTest" configurationId="JUnit" />
396
+    </history-entry>
397
+    <history-entry file="MyMapTest_entrySetTest2 - 2018.11.19 at 13h 04m 21s.xml">
398
+      <configuration name="MyMapTest.entrySetTest2" configurationId="JUnit" />
399
+    </history-entry>
400
+    <history-entry file="MyMapTest_keySetTest2 - 2018.11.19 at 13h 05m 04s.xml">
401
+      <configuration name="MyMapTest.keySetTest2" configurationId="JUnit" />
402
+    </history-entry>
403
+    <history-entry file="MyMapTest_keySetTest2 - 2018.11.19 at 13h 05m 22s.xml">
404
+      <configuration name="MyMapTest.keySetTest2" configurationId="JUnit" />
405
+    </history-entry>
406
+  </component>
407
+  <component name="TimeTrackingManager">
408
+    <option name="totallyTimeSpent" value="21328000" />
409
+  </component>
410
+  <component name="ToolWindowManager">
411
+    <frame x="-145" y="-1001" width="1920" height="1001" extended-state="0" />
412
+    <editor active="true" />
413
+    <layout>
414
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12300319" />
415
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
416
+      <window_info id="Image Layers" order="2" />
417
+      <window_info id="Designer" order="3" />
418
+      <window_info id="UI Designer" order="4" />
419
+      <window_info id="Capture Tool" order="5" />
420
+      <window_info id="Favorites" order="6" side_tool="true" />
421
+      <window_info anchor="bottom" id="Message" order="0" />
422
+      <window_info anchor="bottom" id="Find" order="1" />
423
+      <window_info anchor="bottom" id="Run" order="2" weight="0.3421342" />
424
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
425
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
426
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
427
+      <window_info anchor="bottom" id="TODO" order="6" />
428
+      <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
429
+      <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
430
+      <window_info anchor="bottom" id="Terminal" order="9" />
431
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
432
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32673267" />
433
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
434
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
435
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
436
+      <window_info anchor="right" id="Palette" order="3" />
437
+      <window_info anchor="right" id="Capture Analysis" order="4" />
438
+      <window_info anchor="right" id="Database" order="5" />
439
+      <window_info anchor="right" id="Theme Preview" order="6" />
440
+      <window_info anchor="right" id="Palette&#9;" order="7" />
441
+      <window_info anchor="right" id="Maven Projects" order="8" />
442
+    </layout>
443
+  </component>
444
+  <component name="TypeScriptGeneratedFilesManager">
445
+    <option name="version" value="1" />
446
+  </component>
447
+  <component name="VcsContentAnnotationSettings">
448
+    <option name="myLimit" value="2678400000" />
449
+  </component>
450
+  <component name="editorHistoryManager">
451
+    <entry file="file://$PROJECT_DIR$/pom.xml">
452
+      <provider selected="true" editor-type-id="text-editor">
453
+        <state relative-caret-position="630">
454
+          <caret line="42" lean-forward="true" selection-start-line="42" selection-end-line="42" />
455
+        </state>
456
+      </provider>
457
+    </entry>
458
+    <entry file="file://$PROJECT_DIR$/generics.iml">
459
+      <provider selected="true" editor-type-id="text-editor" />
460
+    </entry>
461
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
462
+      <provider selected="true" editor-type-id="text-editor">
463
+        <state relative-caret-position="1440">
464
+          <caret line="102" column="21" selection-start-line="102" selection-start-column="21" selection-end-line="102" selection-end-column="21" />
465
+        </state>
466
+      </provider>
467
+    </entry>
468
+    <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
469
+      <provider selected="true" editor-type-id="text-editor">
470
+        <state relative-caret-position="446">
471
+          <caret line="39" column="28" lean-forward="true" selection-start-line="39" selection-start-column="28" selection-end-line="39" selection-end-column="28" />
472
+          <folding>
473
+            <element signature="e#521#522#0" expanded="true" />
474
+            <element signature="e#555#556#0" expanded="true" />
475
+            <element signature="e#581#582#0" expanded="true" />
476
+            <element signature="e#615#616#0" expanded="true" />
477
+            <element signature="e#837#838#0" expanded="true" />
478
+            <element signature="e#879#880#0" expanded="true" />
479
+          </folding>
480
+        </state>
481
+      </provider>
482
+    </entry>
483
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
484
+      <provider selected="true" editor-type-id="text-editor">
485
+        <state relative-caret-position="1780">
486
+          <caret line="132" column="14" lean-forward="true" selection-start-line="132" selection-start-column="14" selection-end-line="132" selection-end-column="14" />
487
+          <folding>
488
+            <element signature="imports" expanded="true" />
489
+          </folding>
490
+        </state>
491
+      </provider>
492
+    </entry>
493
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
494
+      <provider selected="true" editor-type-id="text-editor">
495
+        <state relative-caret-position="341">
496
+          <caret line="43" lean-forward="true" selection-start-line="43" selection-end-line="43" />
497
+          <folding>
498
+            <element signature="e#81#82#0" expanded="true" />
499
+            <element signature="e#130#131#0" expanded="true" />
500
+            <element signature="e#158#159#0" expanded="true" />
501
+            <element signature="e#204#205#0" expanded="true" />
502
+            <element signature="e#1074#1075#0" expanded="true" />
503
+            <element signature="e#1104#1105#0" expanded="true" />
504
+          </folding>
505
+        </state>
506
+      </provider>
507
+    </entry>
508
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
509
+      <provider selected="true" editor-type-id="text-editor">
510
+        <state relative-caret-position="1875">
511
+          <caret line="125" column="8" selection-start-line="125" selection-start-column="8" selection-end-line="125" selection-end-column="8" />
512
+          <folding>
513
+            <element signature="imports" expanded="true" />
514
+          </folding>
515
+        </state>
516
+      </provider>
517
+    </entry>
518
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
519
+      <provider selected="true" editor-type-id="text-editor">
520
+        <state relative-caret-position="615">
521
+          <caret line="41" column="5" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
522
+          <folding>
523
+            <element signature="e#732#733#0" expanded="true" />
524
+            <element signature="e#765#766#0" expanded="true" />
525
+          </folding>
526
+        </state>
527
+      </provider>
528
+    </entry>
529
+  </component>
530
+</project>

+ 16
- 0
generics.iml ファイルの表示

@@ -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>

+ 10
- 0
pom.xml ファイルの表示

@@ -19,8 +19,17 @@
19 19
             </plugin>
20 20
         </plugins>
21 21
     </build>
22
+
22 23
     <dependencies>
23 24
 
25
+        <!-- https://mvnrepository.com/artifact/junit/junit -->
26
+        <dependency>
27
+            <groupId>junit</groupId>
28
+            <artifactId>junit</artifactId>
29
+            <version>4.12</version>
30
+            <scope>test</scope>
31
+        </dependency>
32
+
24 33
 
25 34
         <dependency>
26 35
             <groupId>junit</groupId>
@@ -29,4 +38,5 @@
29 38
         </dependency>
30 39
     </dependencies>
31 40
 
41
+
32 42
 </project>

+ 0
- 0
src/main/java/.deleteme ファイルの表示


+ 81
- 0
src/main/java/MyArrayList.java ファイルの表示

@@ -0,0 +1,81 @@
1
+
2
+
3
+public class MyArrayList<T> {
4
+
5
+    T[] list;
6
+
7
+    public MyArrayList(int size) {
8
+        this.list = (T[])new Object[size];
9
+    }
10
+
11
+    public MyArrayList() {
12
+        this.list = (T[])new Object[0];
13
+    }
14
+
15
+    public void add(T dat){
16
+        T[] newArr = (T[]) new Object[list.length + 1];
17
+        for (int i = 0; i < list.length; i++) {
18
+                newArr[i] = list[i];
19
+        }
20
+        newArr[list.length] = dat;
21
+
22
+        list = newArr;
23
+    }
24
+
25
+    public void add(int i, T dat){
26
+        T[] newArr = (T[]) new Object[list.length + 1];
27
+        int counter = 0;
28
+        for (int j = 0; j < list.length; j++) {
29
+            newArr[j] = list[j];
30
+        }
31
+        newArr[list.length] = dat;
32
+
33
+        list = newArr;
34
+    }
35
+
36
+    public void remove(T dat){
37
+        T[] newArr = (T[]) new Object[list.length - 1];
38
+        for (int i = 0; i < list.length-1; i++) {
39
+            if (!list[i].equals(dat)){
40
+                newArr[i] = list[i];
41
+            }
42
+        }
43
+        list = newArr;
44
+
45
+    }
46
+
47
+    public int size(){
48
+        return list.length;
49
+    }
50
+
51
+    public T get(int i){
52
+        return list[i];
53
+    }
54
+
55
+    public T set(int i, T dat){
56
+        return list[i] = dat;
57
+    }
58
+
59
+    public void clear(){
60
+        T[] newArr = (T[]) new Object[0];
61
+        list = newArr;
62
+    }
63
+
64
+
65
+    public boolean isEmpty(){
66
+        if (list.length == 0){
67
+            return true;
68
+        } else
69
+            return false;
70
+    }
71
+
72
+    public boolean contains(T dat){
73
+        for (int i = 0; i < list.length; i++) {
74
+            if (list[i].equals(dat)){
75
+                return true;
76
+            }
77
+        }
78
+        return false;
79
+    }
80
+
81
+}

+ 83
- 0
src/main/java/MyMap.java ファイルの表示

@@ -0,0 +1,83 @@
1
+public class MyMap<T> {
2
+
3
+    MyArrayList<T> list = new MyArrayList<>();
4
+    MySet<T> set = new MySet<>();
5
+    private int size;
6
+
7
+    public void put(T key, T value){
8
+        if (!set.contains(key)){
9
+            set.add(key);
10
+            list.add(value);
11
+        }
12
+
13
+
14
+    }
15
+
16
+    public void remove(T key, T value){
17
+        for (int i = 0; i < set.size(); i++) {
18
+            if(set.get(i) == key && list.get(i) == value){
19
+                set.remove(key);
20
+                list.remove(value);
21
+            }
22
+        }
23
+
24
+    }
25
+
26
+    public Object[] keySet(){
27
+        Object[] keys = new Object[set.size()];
28
+
29
+        for (int i = 0; i < set.size(); i++) {
30
+            keys[i] = set.get(i);
31
+        }
32
+        return keys;
33
+    }
34
+
35
+    public Object[] entrySet(){
36
+        Object[] values = new Object[list.size()];
37
+
38
+        for (int i = 0; i < list.size(); i++) {
39
+            values[i] = list.get(i);
40
+        }
41
+        return values;
42
+    }
43
+
44
+
45
+    public Object get(Object key){
46
+        for (int i = 0; i < set.size(); i++) {
47
+            if (key == set.get(i)){
48
+                return list.get(i);
49
+            }
50
+        }
51
+        return -1;
52
+    }
53
+
54
+    public int size(){
55
+        return set.size();
56
+    }
57
+
58
+    public void clear(){
59
+        list.clear();
60
+        set.clear();
61
+    }
62
+
63
+    public boolean isEmpty(){
64
+        if (list.isEmpty() && set.isEmpty()){
65
+            return true;
66
+        }
67
+            return false;
68
+    }
69
+
70
+    public boolean containsValue(T value){
71
+        if (list.contains(value)){
72
+            return true;
73
+        }
74
+            return false;
75
+    }
76
+
77
+    public boolean containsKey(T key){
78
+        if (set.contains(key)){
79
+            return true;
80
+        }
81
+            return false;
82
+    }
83
+}

+ 57
- 0
src/main/java/MySet.java ファイルの表示

@@ -0,0 +1,57 @@
1
+public class MySet<T> {
2
+
3
+    T[] list;
4
+    MyArrayList<T> myset = new MyArrayList<>();
5
+
6
+
7
+    public MySet(MyArrayList<T> myset) {
8
+        this.myset = myset;
9
+    }
10
+
11
+    public MySet(int size) {
12
+        this.list = (T[])new Object[size];
13
+    }
14
+
15
+    public MySet() {
16
+        this.list = (T[])new Object[0];
17
+    }
18
+
19
+    public void add(T dat){
20
+        if (!myset.contains(dat)) {
21
+            myset.add(dat);
22
+        }
23
+
24
+    }
25
+
26
+    public void remove(T dat){
27
+        myset.remove(dat);
28
+
29
+    }
30
+
31
+    public void set(int i, T dat){
32
+         myset.set(i, dat);
33
+    }
34
+
35
+    public T get(int i){
36
+       return myset.get(i);
37
+    }
38
+
39
+    public int size(){
40
+        return myset.size();
41
+
42
+    }
43
+
44
+    public void clear(){
45
+        myset.clear();
46
+
47
+    }
48
+
49
+    public boolean isEmpty(){
50
+       return myset.isEmpty();
51
+
52
+    }
53
+
54
+    public boolean contains(T dat){
55
+        return myset.contains(dat);
56
+    }
57
+}

+ 0
- 0
src/test/java/.deleteme ファイルの表示


+ 306
- 0
src/test/java/MyArrayListTest.java ファイルの表示

@@ -0,0 +1,306 @@
1
+
2
+import org.junit.Assert;
3
+import org.junit.Test;
4
+
5
+import java.util.List;
6
+
7
+import static org.junit.Assert.*;
8
+
9
+public class MyArrayListTest {
10
+
11
+
12
+    public MyArrayListTest() {
13
+    }
14
+
15
+    @Test
16
+    public void addTest(){
17
+        //Given
18
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
19
+        myArrayList.add(5);
20
+
21
+        //When
22
+        int expected = 1;
23
+        int actual = myArrayList.size();
24
+
25
+        //Then
26
+        Assert.assertEquals(expected, actual);
27
+    }
28
+
29
+    @Test
30
+    public void addTest2(){
31
+        //Given
32
+        MyArrayList<String> myArrayList = new MyArrayList<>();
33
+        myArrayList.add("Hi");
34
+        myArrayList.add("Mars");
35
+
36
+        //When
37
+        int expected = 2;
38
+        int actual = myArrayList.size();
39
+
40
+        //Then
41
+        Assert.assertEquals(expected, actual);
42
+    }
43
+
44
+    @Test
45
+    public void addTest3(){
46
+        //Given
47
+        MyArrayList<Object> myArrayList = new MyArrayList<>();
48
+        myArrayList.add(509);
49
+
50
+        //When
51
+        int expected = 1;
52
+        int actual = myArrayList.size();
53
+
54
+        //Then
55
+        Assert.assertEquals(expected, actual);
56
+    }
57
+
58
+    @Test
59
+    public void addTest4(){
60
+        //Given
61
+        MyArrayList<Long> myArrayList = new MyArrayList<>();
62
+        myArrayList.add(878070L);
63
+
64
+        //When
65
+        int expected = 1;
66
+        int actual = myArrayList.size();
67
+
68
+        //Then
69
+        Assert.assertEquals(expected, actual);
70
+    }
71
+
72
+    @Test
73
+    public void removeTest(){
74
+        //Given
75
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
76
+        myArrayList.add(5);
77
+        myArrayList.add(15);
78
+        myArrayList.remove(5);
79
+        //When
80
+        int expected = 1;
81
+        int actual = myArrayList.size();
82
+        //Then
83
+        Assert.assertEquals(expected, actual);
84
+    }
85
+
86
+    @Test
87
+    public void removeTest2(){
88
+        //Given
89
+        MyArrayList<String> myArrayList = new MyArrayList<>();
90
+        myArrayList.add("Hi");
91
+        myArrayList.add("Mars");
92
+        myArrayList.remove("Mars");
93
+        //When
94
+        int expected = 1;
95
+        int actual = myArrayList.size();
96
+        //Then
97
+        Assert.assertEquals(expected, actual);
98
+    }
99
+
100
+    @Test
101
+    public void removeTest3(){
102
+        //Given
103
+        MyArrayList<Object> myArrayList = new MyArrayList<>();
104
+        myArrayList.add(5);
105
+        myArrayList.add("Hi");
106
+        myArrayList.remove(5);
107
+        //When
108
+        int expected = 1;
109
+        int actual = myArrayList.size();
110
+        //Then
111
+        Assert.assertEquals(expected, actual);
112
+    }
113
+
114
+    @Test
115
+    public void getTest(){
116
+        //Given
117
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
118
+        myArrayList.add(6);
119
+        myArrayList.add(12);
120
+        //When
121
+        Integer expected = 6;
122
+        Integer actual = myArrayList.get(0);
123
+        //Then
124
+        Assert.assertEquals(expected, actual);
125
+    }
126
+
127
+    @Test
128
+    public void getTest2(){
129
+        //Given
130
+        MyArrayList<String> myArrayList = new MyArrayList<>();
131
+        myArrayList.add("Hi");
132
+        myArrayList.add("Mars");
133
+        //When
134
+        String expected = "Hi";
135
+        String actual = myArrayList.get(0);
136
+        //Then
137
+        Assert.assertEquals(expected, actual);
138
+    }
139
+
140
+    @Test
141
+    public void getTest3(){
142
+        //Given
143
+        MyArrayList<Object> myArrayList = new MyArrayList<>();
144
+        myArrayList.add(6);
145
+        myArrayList.add("Hi");
146
+        //When
147
+        Object expected = 6;
148
+        Object actual = myArrayList.get(0);
149
+        //Then
150
+        Assert.assertEquals(expected, actual);
151
+    }
152
+
153
+    @Test
154
+    public void getTest4(){
155
+        //Given
156
+        MyArrayList<Long> myArrayList = new MyArrayList<>();
157
+        myArrayList.add(6L);
158
+        myArrayList.add(1200L);
159
+        //When
160
+        Long expected = 1200L;
161
+        Long actual = myArrayList.get(1);
162
+        //Then
163
+        Assert.assertEquals(expected, actual);
164
+    }
165
+
166
+    @Test
167
+    public void setTest(){
168
+        //Given
169
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
170
+        myArrayList.add(45);
171
+        myArrayList.add(12);
172
+        myArrayList.set(0, 6);
173
+        //When
174
+        int expected = 6;
175
+        int actual = myArrayList.get(0);
176
+        //Then
177
+        Assert.assertEquals(expected, actual);
178
+    }
179
+
180
+    @Test
181
+    public void setTest2(){
182
+        //Given
183
+        MyArrayList<String> myArrayList = new MyArrayList<>();
184
+        myArrayList.add("Hi");
185
+        myArrayList.add("Mars");
186
+        myArrayList.set(0, "Bye");
187
+        //When
188
+        String expected = "Bye";
189
+        String actual = myArrayList.get(0);
190
+        //Then
191
+        Assert.assertEquals(expected, actual);
192
+    }
193
+
194
+    @Test
195
+    public void setTest3(){
196
+        //Given
197
+        MyArrayList<Object> myArrayList = new MyArrayList<>();
198
+        myArrayList.add(45);
199
+        myArrayList.add("Hi");
200
+        myArrayList.set(0, 6);
201
+        //When
202
+        Object expected = 6;
203
+        Object actual = myArrayList.get(0);
204
+        //Then
205
+        Assert.assertEquals(expected, actual);
206
+    }
207
+
208
+    @Test
209
+    public void setTest4(){
210
+        //Given
211
+        MyArrayList<Long> myArrayList = new MyArrayList<>();
212
+        myArrayList.add(45L);
213
+        myArrayList.add(1200L);
214
+        myArrayList.set(0, 6L);
215
+        //When
216
+        Long expected = 6L;
217
+        Long actual = myArrayList.get(0);
218
+        //Then
219
+        Assert.assertEquals(expected, actual);
220
+    }
221
+
222
+
223
+    @Test
224
+    public void clearTest(){
225
+        //Given
226
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
227
+        myArrayList.add(45);
228
+        myArrayList.add(12);
229
+        myArrayList.clear();
230
+        //When
231
+
232
+        //Then
233
+        Assert.assertTrue(myArrayList.isEmpty());
234
+    }
235
+
236
+    @Test
237
+    public void isEmptyTest(){
238
+        //Given
239
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
240
+        myArrayList.add(45);
241
+        myArrayList.add(12);
242
+        //When
243
+
244
+        //Then
245
+        Assert.assertFalse(myArrayList.isEmpty());
246
+    }
247
+
248
+    @Test
249
+    public void isEmptyTest2(){
250
+        //Given
251
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
252
+        //When
253
+
254
+        //Then
255
+        Assert.assertTrue(myArrayList.isEmpty());
256
+    }
257
+
258
+    @Test
259
+    public void containsTest(){
260
+        //Given
261
+        MyArrayList<Integer> myArrayList = new MyArrayList<>();
262
+        myArrayList.add(45);
263
+        myArrayList.add(12);
264
+        //When
265
+
266
+        //Then
267
+        Assert.assertTrue(myArrayList.contains(12));
268
+    }
269
+
270
+    @Test
271
+    public void containsTest2(){
272
+        //Given
273
+        MyArrayList<String> myArrayList = new MyArrayList<>();
274
+        myArrayList.add("Hi");
275
+        myArrayList.add("Mars");
276
+        //When
277
+
278
+        //Then
279
+        Assert.assertTrue(myArrayList.contains("Mars"));
280
+    }
281
+
282
+    @Test
283
+    public void containsTest3(){
284
+        //Given
285
+        MyArrayList<Object> myArrayList = new MyArrayList<>();
286
+        myArrayList.add(45);
287
+        myArrayList.add("Hi");
288
+        //When
289
+
290
+        //Then
291
+        Assert.assertTrue(myArrayList.contains(45));
292
+    }
293
+
294
+    @Test
295
+    public void containsTest4(){
296
+        //Given
297
+        MyArrayList<Long> myArrayList = new MyArrayList<>();
298
+        myArrayList.add(45L);
299
+        myArrayList.add(12343L);
300
+        //When
301
+
302
+        //Then
303
+        Assert.assertTrue(myArrayList.contains(12343L));
304
+    }
305
+
306
+}

+ 228
- 0
src/test/java/MyMapTest.java ファイルの表示

@@ -0,0 +1,228 @@
1
+import com.sun.deploy.util.ArrayUtil;
2
+import org.junit.Assert;
3
+import org.junit.Test;
4
+
5
+import java.lang.reflect.Array;
6
+import java.util.ArrayList;
7
+import java.util.Arrays;
8
+
9
+import static org.junit.Assert.*;
10
+
11
+public class MyMapTest {
12
+
13
+    @Test
14
+    public void putTest() {
15
+        MyMap<Integer> testMap = new MyMap<>();
16
+        testMap.put(1, 45);
17
+        testMap.put(2, 65);
18
+
19
+        int expected = 2;
20
+
21
+        Assert.assertEquals(expected, testMap.size());
22
+    }
23
+
24
+    @Test
25
+    public void putTest2() {
26
+        MyMap<String> testMap = new MyMap<>();
27
+        testMap.put("Hi", "Mars");
28
+        testMap.put("Hello", "Moon");
29
+
30
+        int expected = 2;
31
+
32
+        Assert.assertEquals(expected, testMap.size());
33
+    }
34
+
35
+    @Test
36
+    public void putTest3() {
37
+        MyMap<Object> testMap = new MyMap<>();
38
+        testMap.put(1, "Mars");
39
+        testMap.put(2, "Moon");
40
+
41
+        int expected = 2;
42
+
43
+        Assert.assertEquals(expected, testMap.size());
44
+    }
45
+
46
+    @Test
47
+    public void putTest4() {
48
+        MyMap<Long> testMap = new MyMap<>();
49
+        testMap.put(1L, 45L);
50
+        testMap.put(24L, 65L);
51
+
52
+        int expected = 2;
53
+
54
+        Assert.assertEquals(expected, testMap.size());
55
+    }
56
+
57
+
58
+    @Test
59
+    public void removeTest() {
60
+        MyMap<Integer> testMap = new MyMap<>();
61
+        testMap.put(1, 45);
62
+        testMap.put(2, 65);
63
+        testMap.remove(2, 65);
64
+        int expected = 1;
65
+
66
+        Assert.assertEquals(expected, testMap.size());
67
+    }
68
+
69
+    @Test
70
+    public void removeTest2() {
71
+        MyMap<String> testMap = new MyMap<>();
72
+        testMap.put("Hi", "Mars");
73
+        testMap.put("Hello", "Earth");
74
+        testMap.remove("Hi", "Mars");
75
+        int expected = 1;
76
+
77
+        Assert.assertEquals(expected, testMap.size());
78
+    }
79
+    @Test
80
+    public void removeTest3() {
81
+        MyMap<Object> testMap = new MyMap<>();
82
+        testMap.put(1, "Hi");
83
+        testMap.put(2, "Mars");
84
+        testMap.remove(2, "Mars");
85
+        int expected = 1;
86
+
87
+        Assert.assertEquals(expected, testMap.size());
88
+    }
89
+    @Test
90
+    public void removeTest4() {
91
+        MyMap<Long> testMap = new MyMap<>();
92
+        testMap.put(1L, 45L);
93
+        testMap.put(2L, 65L);
94
+        testMap.remove(2L, 65L);
95
+        int expected = 1;
96
+
97
+        Assert.assertEquals(expected, testMap.size());
98
+    }
99
+
100
+    @Test
101
+    public void keySetTest() {
102
+        MyMap<Integer> testMap = new MyMap<>();
103
+        testMap.put(1, 45);
104
+        testMap.put(2, 65);
105
+        testMap.put(6, 100);
106
+        testMap.put(10, 33);
107
+
108
+        Integer[] expected = {1, 2, 6, 10};
109
+
110
+        System.out.println(Arrays.toString(testMap.keySet()));
111
+
112
+        Assert.assertEquals(expected, testMap.keySet());
113
+    }
114
+
115
+    @Test
116
+    public void keySetTest2(){
117
+        MyMap<String> testMap = new MyMap<>();
118
+        testMap.put("hi", "Mars");
119
+        testMap.put("Bye", "Moon");
120
+
121
+
122
+        String[] expected = {"hi", "Bye"};
123
+
124
+        System.out.println(Arrays.toString(testMap.keySet()));
125
+
126
+        Assert.assertEquals(expected, testMap.keySet());
127
+    }
128
+
129
+    @Test
130
+    public void entrySetTest(){
131
+        MyMap<Integer> testMap = new MyMap<>();
132
+        testMap.put(1, 45);
133
+        testMap.put(2, 65);
134
+        testMap.put(6, 100);
135
+        testMap.put(10, 33);
136
+
137
+        Integer[] expected = {45, 65, 100, 33};
138
+
139
+        System.out.println(Arrays.toString(testMap.entrySet()));
140
+
141
+        Assert.assertEquals(expected, testMap.entrySet());
142
+    }
143
+
144
+    @Test
145
+    public void entrySetTest2(){
146
+        MyMap<String> testMap = new MyMap<>();
147
+        testMap.put("hi", "Mars");
148
+        testMap.put("Bye", "Moon");
149
+
150
+
151
+        String[] expected = {"Mars", "Moon"};
152
+
153
+        System.out.println(Arrays.toString(testMap.entrySet()));
154
+
155
+        Assert.assertEquals(expected, testMap.entrySet());
156
+    }
157
+
158
+    @Test
159
+    public void get() {
160
+        MyMap<Integer> testMap = new MyMap<>();
161
+        testMap.put(1, 45);
162
+        testMap.put(2, 65);
163
+
164
+        int expected = 65;
165
+
166
+        Assert.assertEquals(expected, testMap.get(2));
167
+    }
168
+
169
+    @Test
170
+    public void size() {
171
+        MyMap<Integer> testMap = new MyMap<>();
172
+        testMap.put(1, 45);
173
+        testMap.put(2, 65);
174
+        testMap.put(3, 77);
175
+
176
+        int expected = 3;
177
+
178
+        Assert.assertEquals(expected, testMap.size());
179
+    }
180
+
181
+    @Test
182
+    public void clear() {
183
+        MyMap<Integer> testMap = new MyMap<>();
184
+        testMap.put(1, 45);
185
+        testMap.put(2, 65);
186
+        testMap.clear();
187
+        int expected = 0;
188
+
189
+        Assert.assertEquals(expected, testMap.size());
190
+    }
191
+
192
+    @Test
193
+    public void isEmpty() {
194
+        MyMap<Integer> testMap = new MyMap<>();
195
+        testMap.put(1, 45);
196
+        testMap.put(2, 65);
197
+        testMap.clear();
198
+
199
+        Assert.assertTrue(testMap.isEmpty());
200
+    }
201
+
202
+    @Test
203
+    public void isEmpty2(){
204
+        MyMap<Integer> testMap = new MyMap<>();
205
+        testMap.put(1, 45);
206
+        testMap.put(2, 65);
207
+
208
+        Assert.assertFalse(testMap.isEmpty());
209
+    }
210
+
211
+    @Test
212
+    public void containsValueTest() {
213
+        MyMap<Integer> testMap = new MyMap<>();
214
+        testMap.put(1, 45);
215
+        testMap.put(2, 65);
216
+
217
+        Assert.assertTrue(testMap.containsValue(65));
218
+    }
219
+
220
+    @Test
221
+    public void containsKeyTest(){
222
+        MyMap<Integer> testMap = new MyMap<>();
223
+        testMap.put(1, 45);
224
+        testMap.put(2, 65);
225
+
226
+        Assert.assertTrue(testMap.containsKey(2));
227
+    }
228
+}

+ 302
- 0
src/test/java/MySetTest.java ファイルの表示

@@ -0,0 +1,302 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import java.util.HashSet;
5
+import java.util.Set;
6
+
7
+import static org.junit.Assert.*;
8
+
9
+public class MySetTest {
10
+
11
+    @Test
12
+    public void addTest(){
13
+        //Given
14
+        MySet<Integer> mySet = new MySet<>();
15
+        mySet.add(5);
16
+
17
+        //When
18
+        int expected = 1;
19
+
20
+        //Then
21
+        Assert.assertEquals(expected, mySet.size());
22
+    }
23
+
24
+    @Test
25
+    public void addTest2(){
26
+        //Given
27
+        MySet<String> mySet = new MySet<>();
28
+        mySet.add("Hi");
29
+        mySet.add("Mars");
30
+        mySet.add("Hi");
31
+
32
+        //When
33
+        int expected = 2;
34
+
35
+        //Then
36
+        Assert.assertEquals(expected, mySet.size());
37
+    }
38
+
39
+    @Test
40
+    public void addTest3(){
41
+        //Given
42
+        MySet<Object> mySet = new MySet<>();
43
+        mySet.add(509);
44
+        mySet.add(509);
45
+
46
+        //When
47
+        int expected = 1;
48
+
49
+        //Then
50
+        Assert.assertEquals(expected, mySet.size());
51
+    }
52
+
53
+    @Test
54
+    public void addTest4(){
55
+        //Given
56
+        MySet<Long> mySet = new MySet<>();
57
+        mySet.add(878070L);
58
+
59
+        //When
60
+        int expected = 1;
61
+        int actual = mySet.size();
62
+
63
+        //Then
64
+        Assert.assertEquals(expected, actual);
65
+    }
66
+
67
+
68
+    @Test
69
+    public void removeTest(){
70
+        //Given
71
+        MySet<Integer> mySet = new MySet<>();
72
+        mySet.add(5);
73
+        mySet.add(15);
74
+        mySet.add(5);
75
+        mySet.remove(5);
76
+        //When
77
+        int expected = 1;
78
+        int actual = mySet.size();
79
+        //Then
80
+        Assert.assertEquals(expected, actual);
81
+    }
82
+
83
+    @Test
84
+    public void removeTest2(){
85
+        //Given
86
+        MySet<String> mySet = new MySet<>();
87
+        mySet.add("Hi");
88
+        mySet.add("Mars");
89
+        mySet.remove("Mars");
90
+        //When
91
+        int expected = 1;
92
+        int actual = mySet.size();
93
+        //Then
94
+        Assert.assertEquals(expected, actual);
95
+    }
96
+
97
+    @Test
98
+    public void removeTest3(){
99
+        //Given
100
+        MySet<Object> mySet = new MySet<>();
101
+        mySet.add(5);
102
+        mySet.add("Hi");
103
+        mySet.add("Hi");
104
+        mySet.remove(5);
105
+        //When
106
+        int expected = 1;
107
+        int actual = mySet.size();
108
+        //Then
109
+        Assert.assertEquals(expected, actual);
110
+    }
111
+
112
+    @Test
113
+    public void setTest(){
114
+        //Given
115
+        MySet<Integer> mySet = new MySet<>();
116
+        mySet.add(45);
117
+        mySet.add(12);
118
+        mySet.set(0, 6);
119
+        //When
120
+        int expected = 6;
121
+        int actual = mySet.get(0);
122
+        //Then
123
+        Assert.assertEquals(expected, actual);
124
+    }
125
+
126
+    @Test
127
+    public void setTest2(){
128
+        //Given
129
+        MySet<String> mySet = new MySet<>();
130
+        mySet.add("Hi");
131
+        mySet.add("Mars");
132
+        mySet.set(0, "Bye");
133
+        //When
134
+        String expected = "Bye";
135
+        String actual = mySet.get(0);
136
+        //Then
137
+        Assert.assertEquals(expected, actual);
138
+    }
139
+
140
+    @Test
141
+    public void setTest3(){
142
+        //Given
143
+        MySet<Object> mySet = new MySet<>();
144
+        mySet.add(45);
145
+        mySet.add("Hi");
146
+        mySet.set(0, 6);
147
+        //When
148
+        Object expected = 6;
149
+        Object actual = mySet.get(0);
150
+        //Then
151
+        Assert.assertEquals(expected, actual);
152
+    }
153
+
154
+    @Test
155
+    public void setTest4(){
156
+        //Given
157
+        MySet<Long> mySet = new MySet<>();
158
+        mySet.add(45L);
159
+        mySet.add(1200L);
160
+        mySet.set(0, 6L);
161
+        //When
162
+        Long expected = 6L;
163
+        Long actual = mySet.get(0);
164
+        //Then
165
+        Assert.assertEquals(expected, actual);
166
+    }
167
+
168
+    @Test
169
+    public void getTest(){
170
+        //Given
171
+        MySet<Integer> mySet = new MySet<>();
172
+        mySet.add(6);
173
+        mySet.add(12);
174
+        //When
175
+        int expected = 6;
176
+        int actual = mySet.get(0);
177
+        //Then
178
+        Assert.assertEquals(expected, actual);
179
+    }
180
+
181
+    @Test
182
+    public void getTest2(){
183
+        //Given
184
+        MySet<String> mySet = new MySet<>();
185
+        mySet.add("Hi");
186
+        mySet.add("Mars");
187
+        //When
188
+        String expected = "Hi";
189
+        String actual = mySet.get(0);
190
+        //Then
191
+        Assert.assertEquals(expected, actual);
192
+    }
193
+
194
+    @Test
195
+    public void getTest3(){
196
+        //Given
197
+        MySet<Object> mySet = new MySet<>();
198
+        mySet.add(6);
199
+        mySet.add("Hi");
200
+        //When
201
+        Object expected = 6;
202
+        Object actual = mySet.get(0);
203
+        //Then
204
+        Assert.assertEquals(expected, actual);
205
+    }
206
+
207
+    @Test
208
+    public void getTest4(){
209
+        //Given
210
+        MySet<Long> mySet = new MySet<>();
211
+        mySet.add(6L);
212
+        mySet.add(1200L);
213
+        //When
214
+        Long expected = 1200L;
215
+        Long actual = mySet.get(1);
216
+        //Then
217
+        Assert.assertEquals(expected, actual);
218
+    }
219
+
220
+    @Test
221
+    public void clearTest(){
222
+        //Given
223
+        MySet<Integer> mySet = new MySet<>();
224
+        mySet.add(45);
225
+        mySet.add(12);
226
+        mySet.clear();
227
+        //When
228
+
229
+        //Then
230
+        Assert.assertTrue(mySet.isEmpty());
231
+    }
232
+
233
+    @Test
234
+    public void isEmptyTest(){
235
+        //Given
236
+        MySet<Integer> mySet = new MySet<>();
237
+        mySet.add(45);
238
+        mySet.add(12);
239
+        //When
240
+
241
+        //Then
242
+        Assert.assertFalse(mySet.isEmpty());
243
+    }
244
+
245
+    @Test
246
+    public void isEmptyTest2(){
247
+        //Given
248
+        MySet<Integer> mySet = new MySet<>();
249
+        //When
250
+
251
+        //Then
252
+        Assert.assertTrue(mySet.isEmpty());
253
+    }
254
+
255
+    @Test
256
+    public void containsTest(){
257
+        //Given
258
+        MySet<Integer> mySet = new MySet<>();
259
+        mySet.add(45);
260
+        mySet.add(12);
261
+        //When
262
+
263
+        //Then
264
+        Assert.assertTrue(mySet.contains(12));
265
+    }
266
+
267
+    @Test
268
+    public void containsTest2(){
269
+        //Given
270
+        MySet<String> mySet = new MySet<>();
271
+        mySet.add("Hi");
272
+        mySet.add("Mars");
273
+        //When
274
+
275
+        //Then
276
+        Assert.assertTrue(mySet.contains("Mars"));
277
+    }
278
+
279
+    @Test
280
+    public void containsTest3(){
281
+        //Given
282
+        MySet<Object> mySet = new MySet<>();
283
+        mySet.add(45);
284
+        mySet.add("Hi");
285
+        //When
286
+
287
+        //Then
288
+        Assert.assertTrue(mySet.contains(45));
289
+    }
290
+
291
+    @Test
292
+    public void containsTest4(){
293
+        //Given
294
+        MySet<Long> mySet = new MySet<>();
295
+        mySet.add(45L);
296
+        mySet.add(12343L);
297
+        //When
298
+
299
+        //Then
300
+        Assert.assertTrue(mySet.contains(12343L));
301
+    }
302
+}