#32 MyArrayList_JevitTith

開啟中
jtith 請求將 1 次程式碼提交從 jtith/CR-MicroLabs-Generics-MyArrayList:master 合併至 master

+ 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 target="1.8">
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>

+ 458
- 0
.idea/workspace.xml 查看文件

@@ -0,0 +1,458 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="da18d055-5707-46c5-b8ad-b849542c6c65" 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/misc.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/generics.iml" afterDir="false" />
11
+      <change afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
12
+      <change afterPath="$PROJECT_DIR$/src/main/java/MySet.java" afterDir="false" />
13
+      <change afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
14
+      <change afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" afterDir="false" />
15
+    </list>
16
+    <ignored path="$PROJECT_DIR$/target/" />
17
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
18
+    <option name="SHOW_DIALOG" value="false" />
19
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
20
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
21
+    <option name="LAST_RESOLUTION" value="IGNORE" />
22
+  </component>
23
+  <component name="FUSProjectUsageTrigger">
24
+    <session id="1785125696">
25
+      <usages-collector id="statistics.lifecycle.project">
26
+        <counts>
27
+          <entry key="project.closed" value="2" />
28
+          <entry key="project.open.time.1" value="1" />
29
+          <entry key="project.open.time.7" value="1" />
30
+          <entry key="project.opened" value="2" />
31
+        </counts>
32
+      </usages-collector>
33
+      <usages-collector id="statistics.file.extensions.open">
34
+        <counts>
35
+          <entry key="java" value="4" />
36
+        </counts>
37
+      </usages-collector>
38
+      <usages-collector id="statistics.file.types.open">
39
+        <counts>
40
+          <entry key="JAVA" value="4" />
41
+        </counts>
42
+      </usages-collector>
43
+      <usages-collector id="statistics.file.extensions.edit">
44
+        <counts>
45
+          <entry key="java" value="2396" />
46
+        </counts>
47
+      </usages-collector>
48
+      <usages-collector id="statistics.file.types.edit">
49
+        <counts>
50
+          <entry key="JAVA" value="2396" />
51
+        </counts>
52
+      </usages-collector>
53
+    </session>
54
+  </component>
55
+  <component name="FileEditorManager">
56
+    <leaf>
57
+      <file pinned="false" current-in-tab="false">
58
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
59
+          <provider selected="true" editor-type-id="text-editor">
60
+            <state relative-caret-position="1050">
61
+              <caret line="70" column="5" lean-forward="true" selection-start-line="70" selection-start-column="5" selection-end-line="70" selection-end-column="5" />
62
+              <folding>
63
+                <element signature="e#111#112#0" expanded="true" />
64
+                <element signature="e#163#164#0" expanded="true" />
65
+                <element signature="e#200#201#0" expanded="true" />
66
+                <element signature="e#255#256#0" expanded="true" />
67
+                <element signature="e#292#293#0" expanded="true" />
68
+                <element signature="e#325#326#0" expanded="true" />
69
+                <element signature="e#1611#1612#0" expanded="true" />
70
+                <element signature="e#1654#1655#0" expanded="true" />
71
+                <element signature="e#2100#2101#0" expanded="true" />
72
+                <element signature="e#2141#2142#0" expanded="true" />
73
+              </folding>
74
+            </state>
75
+          </provider>
76
+        </entry>
77
+      </file>
78
+      <file pinned="false" current-in-tab="false">
79
+        <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
80
+          <provider selected="true" editor-type-id="text-editor">
81
+            <state relative-caret-position="615">
82
+              <caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
83
+              <folding>
84
+                <element signature="e#233#234#0" expanded="true" />
85
+                <element signature="e#260#261#0" expanded="true" />
86
+                <element signature="e#299#300#0" expanded="true" />
87
+                <element signature="e#335#336#0" expanded="true" />
88
+                <element signature="e#372#373#0" expanded="true" />
89
+                <element signature="e#407#408#0" expanded="true" />
90
+                <element signature="e#442#443#0" expanded="true" />
91
+                <element signature="e#470#471#0" expanded="true" />
92
+                <element signature="e#499#500#0" expanded="true" />
93
+                <element signature="e#521#522#0" expanded="true" />
94
+              </folding>
95
+            </state>
96
+          </provider>
97
+        </entry>
98
+      </file>
99
+      <file pinned="false" current-in-tab="true">
100
+        <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
101
+          <provider selected="true" editor-type-id="text-editor">
102
+            <state relative-caret-position="720">
103
+              <caret line="48" lean-forward="true" selection-start-line="48" selection-end-line="48" />
104
+              <folding>
105
+                <element signature="imports" expanded="true" />
106
+                <element signature="e#108#109#0" expanded="true" />
107
+                <element signature="e#142#143#0" expanded="true" />
108
+                <element signature="e#629#630#0" expanded="true" />
109
+                <element signature="e#650#651#0" expanded="true" />
110
+              </folding>
111
+            </state>
112
+          </provider>
113
+        </entry>
114
+      </file>
115
+      <file pinned="false" current-in-tab="false">
116
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
117
+          <provider selected="true" editor-type-id="text-editor">
118
+            <state relative-caret-position="396">
119
+              <caret line="45" column="3" selection-start-line="45" selection-start-column="3" selection-end-line="45" selection-end-column="3" />
120
+              <folding>
121
+                <element signature="imports" expanded="true" />
122
+                <element signature="e#154#155#0" expanded="true" />
123
+                <element signature="e#200#201#0" expanded="true" />
124
+              </folding>
125
+            </state>
126
+          </provider>
127
+        </entry>
128
+      </file>
129
+    </leaf>
130
+  </component>
131
+  <component name="FileTemplateManagerImpl">
132
+    <option name="RECENT_TEMPLATES">
133
+      <list>
134
+        <option value="Class" />
135
+      </list>
136
+    </option>
137
+  </component>
138
+  <component name="Git.Settings">
139
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
140
+  </component>
141
+  <component name="IdeDocumentHistory">
142
+    <option name="CHANGED_PATHS">
143
+      <list>
144
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
145
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
146
+        <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
147
+        <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
148
+      </list>
149
+    </option>
150
+  </component>
151
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
152
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
153
+  <component name="JsGulpfileManager">
154
+    <detection-done>true</detection-done>
155
+    <sorting>DEFINITION_ORDER</sorting>
156
+  </component>
157
+  <component name="ProjectFrameBounds">
158
+    <option name="y" value="23" />
159
+    <option name="width" value="1280" />
160
+    <option name="height" value="730" />
161
+  </component>
162
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
163
+  <component name="ProjectView">
164
+    <navigator proportions="" version="1">
165
+      <foldersAlwaysOnTop value="true" />
166
+    </navigator>
167
+    <panes>
168
+      <pane id="Scope" />
169
+      <pane id="PackagesPane" />
170
+      <pane id="ProjectPane">
171
+        <subPane>
172
+          <expand>
173
+            <path>
174
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
175
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
176
+            </path>
177
+            <path>
178
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
179
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
180
+              <item name="src" type="462c0819:PsiDirectoryNode" />
181
+            </path>
182
+            <path>
183
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
184
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
185
+              <item name="src" type="462c0819:PsiDirectoryNode" />
186
+              <item name="main" type="462c0819:PsiDirectoryNode" />
187
+            </path>
188
+            <path>
189
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
190
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
191
+              <item name="src" type="462c0819:PsiDirectoryNode" />
192
+              <item name="main" type="462c0819:PsiDirectoryNode" />
193
+              <item name="java" type="462c0819:PsiDirectoryNode" />
194
+            </path>
195
+            <path>
196
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
197
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
198
+              <item name="src" type="462c0819:PsiDirectoryNode" />
199
+              <item name="test" type="462c0819:PsiDirectoryNode" />
200
+            </path>
201
+            <path>
202
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
203
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
204
+              <item name="src" type="462c0819:PsiDirectoryNode" />
205
+              <item name="test" type="462c0819:PsiDirectoryNode" />
206
+              <item name="java" type="462c0819:PsiDirectoryNode" />
207
+            </path>
208
+          </expand>
209
+          <select />
210
+        </subPane>
211
+      </pane>
212
+    </panes>
213
+  </component>
214
+  <component name="PropertiesComponent">
215
+    <property name="WebServerToolWindowFactoryState" value="false" />
216
+    <property name="aspect.path.notification.shown" value="true" />
217
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1543702461741" />
218
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
219
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
220
+    <property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
221
+  </component>
222
+  <component name="RunDashboard">
223
+    <option name="ruleStates">
224
+      <list>
225
+        <RuleState>
226
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
227
+        </RuleState>
228
+        <RuleState>
229
+          <option name="name" value="StatusDashboardGroupingRule" />
230
+        </RuleState>
231
+      </list>
232
+    </option>
233
+  </component>
234
+  <component name="RunManager" selected="JUnit.MySetTest.SizeTest">
235
+    <configuration name="MySetTest.AddFalseTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
236
+      <module name="generics" />
237
+      <option name="PACKAGE_NAME" value="" />
238
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
239
+      <option name="METHOD_NAME" value="AddFalseTest" />
240
+      <option name="TEST_OBJECT" value="method" />
241
+      <method v="2">
242
+        <option name="Make" enabled="true" />
243
+      </method>
244
+    </configuration>
245
+    <configuration name="MySetTest.AddTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
246
+      <module name="generics" />
247
+      <option name="PACKAGE_NAME" value="" />
248
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
249
+      <option name="METHOD_NAME" value="AddTest" />
250
+      <option name="TEST_OBJECT" value="method" />
251
+      <method v="2">
252
+        <option name="Make" enabled="true" />
253
+      </method>
254
+    </configuration>
255
+    <configuration name="MySetTest.ClearTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
256
+      <module name="generics" />
257
+      <option name="PACKAGE_NAME" value="" />
258
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
259
+      <option name="METHOD_NAME" value="ClearTest" />
260
+      <option name="TEST_OBJECT" value="method" />
261
+      <method v="2">
262
+        <option name="Make" enabled="true" />
263
+      </method>
264
+    </configuration>
265
+    <configuration name="MySetTest.EmptyTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
266
+      <module name="generics" />
267
+      <option name="PACKAGE_NAME" value="" />
268
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
269
+      <option name="METHOD_NAME" value="EmptyTest" />
270
+      <option name="TEST_OBJECT" value="method" />
271
+      <method v="2">
272
+        <option name="Make" enabled="true" />
273
+      </method>
274
+    </configuration>
275
+    <configuration name="MySetTest.SizeTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
276
+      <module name="generics" />
277
+      <option name="PACKAGE_NAME" value="" />
278
+      <option name="MAIN_CLASS_NAME" value="MySetTest" />
279
+      <option name="METHOD_NAME" value="SizeTest" />
280
+      <option name="TEST_OBJECT" value="method" />
281
+      <method v="2">
282
+        <option name="Make" enabled="true" />
283
+      </method>
284
+    </configuration>
285
+    <list>
286
+      <item itemvalue="JUnit.MySetTest.AddFalseTest" />
287
+      <item itemvalue="JUnit.MySetTest.AddTest" />
288
+      <item itemvalue="JUnit.MySetTest.ClearTest" />
289
+      <item itemvalue="JUnit.MySetTest.EmptyTest" />
290
+      <item itemvalue="JUnit.MySetTest.SizeTest" />
291
+    </list>
292
+    <recent_temporary>
293
+      <list>
294
+        <item itemvalue="JUnit.MySetTest.SizeTest" />
295
+        <item itemvalue="JUnit.MySetTest.EmptyTest" />
296
+        <item itemvalue="JUnit.MySetTest.AddTest" />
297
+        <item itemvalue="JUnit.MySetTest.ClearTest" />
298
+        <item itemvalue="JUnit.MySetTest.AddFalseTest" />
299
+      </list>
300
+    </recent_temporary>
301
+  </component>
302
+  <component name="SvnConfiguration">
303
+    <configuration />
304
+  </component>
305
+  <component name="TaskManager">
306
+    <task active="true" id="Default" summary="Default task">
307
+      <changelist id="da18d055-5707-46c5-b8ad-b849542c6c65" name="Default Changelist" comment="" />
308
+      <created>1542651951682</created>
309
+      <option name="number" value="Default" />
310
+      <option name="presentableId" value="Default" />
311
+      <updated>1542651951682</updated>
312
+      <workItem from="1542651956661" duration="2975000" />
313
+      <workItem from="1543612520399" duration="6371000" />
314
+    </task>
315
+    <servers />
316
+  </component>
317
+  <component name="TestHistory">
318
+    <history-entry file="MyArrayListTest_addIntTest - 2018.12.01 at 16h 22m 37s.xml">
319
+      <configuration name="MyArrayListTest.addIntTest" configurationId="JUnit" />
320
+    </history-entry>
321
+    <history-entry file="MyArrayListTest_getIntTest - 2018.12.01 at 16h 25m 11s.xml">
322
+      <configuration name="MyArrayListTest.getIntTest" configurationId="JUnit" />
323
+    </history-entry>
324
+    <history-entry file="MyArrayListTest_getIntTest - 2018.12.01 at 16h 25m 55s.xml">
325
+      <configuration name="MyArrayListTest.getIntTest" configurationId="JUnit" />
326
+    </history-entry>
327
+    <history-entry file="MyArrayListTest_getIntTest - 2018.12.01 at 16h 26m 36s.xml">
328
+      <configuration name="MyArrayListTest.getIntTest" configurationId="JUnit" />
329
+    </history-entry>
330
+    <history-entry file="MySetTest_AddFalseTest - 2018.12.01 at 17h 02m 37s.xml">
331
+      <configuration name="MySetTest.AddFalseTest" configurationId="JUnit" />
332
+    </history-entry>
333
+    <history-entry file="MySetTest_AddTest - 2018.12.01 at 17h 05m 39s.xml">
334
+      <configuration name="MySetTest.AddTest" configurationId="JUnit" />
335
+    </history-entry>
336
+    <history-entry file="MySetTest_ClearTest - 2018.12.01 at 17h 07m 14s.xml">
337
+      <configuration name="MySetTest.ClearTest" configurationId="JUnit" />
338
+    </history-entry>
339
+    <history-entry file="MySetTest_AddTest - 2018.12.01 at 17h 07m 17s.xml">
340
+      <configuration name="MySetTest.AddTest" configurationId="JUnit" />
341
+    </history-entry>
342
+    <history-entry file="MySetTest_EmptyTest - 2018.12.01 at 17h 09m 41s.xml">
343
+      <configuration name="MySetTest.EmptyTest" configurationId="JUnit" />
344
+    </history-entry>
345
+    <history-entry file="MySetTest_SizeTest - 2018.12.01 at 17h 13m 09s.xml">
346
+      <configuration name="MySetTest.SizeTest" configurationId="JUnit" />
347
+    </history-entry>
348
+  </component>
349
+  <component name="TimeTrackingManager">
350
+    <option name="totallyTimeSpent" value="9346000" />
351
+  </component>
352
+  <component name="ToolWindowManager">
353
+    <frame x="0" y="23" width="1280" height="730" extended-state="0" />
354
+    <editor active="true" />
355
+    <layout>
356
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2536349" />
357
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
358
+      <window_info id="Image Layers" order="2" />
359
+      <window_info id="Designer" order="3" />
360
+      <window_info id="UI Designer" order="4" />
361
+      <window_info id="Capture Tool" order="5" />
362
+      <window_info id="Favorites" order="6" side_tool="true" />
363
+      <window_info anchor="bottom" id="Messages" weight="0.3291536" />
364
+      <window_info anchor="bottom" id="Message" order="0" />
365
+      <window_info anchor="bottom" id="Find" order="1" />
366
+      <window_info anchor="bottom" id="Run" order="2" weight="0.3291536" />
367
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
368
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
369
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
370
+      <window_info anchor="bottom" id="TODO" order="6" />
371
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
372
+      <window_info anchor="bottom" id="Terminal" order="8" />
373
+      <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
374
+      <window_info anchor="bottom" id="Version Control" order="10" show_stripe_button="false" />
375
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
376
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
377
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
378
+      <window_info anchor="right" id="Palette" order="3" />
379
+      <window_info anchor="right" id="Capture Analysis" order="4" />
380
+      <window_info anchor="right" id="Theme Preview" order="5" />
381
+      <window_info anchor="right" id="Palette&#9;" order="6" />
382
+      <window_info anchor="right" id="Database" order="7" />
383
+      <window_info anchor="right" id="Maven Projects" order="8" />
384
+    </layout>
385
+  </component>
386
+  <component name="TypeScriptGeneratedFilesManager">
387
+    <option name="version" value="1" />
388
+  </component>
389
+  <component name="VcsContentAnnotationSettings">
390
+    <option name="myLimit" value="2678400000" />
391
+  </component>
392
+  <component name="editorHistoryManager">
393
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
394
+      <provider selected="true" editor-type-id="text-editor">
395
+        <state relative-caret-position="396">
396
+          <caret line="45" column="3" selection-start-line="45" selection-start-column="3" selection-end-line="45" selection-end-column="3" />
397
+          <folding>
398
+            <element signature="imports" expanded="true" />
399
+            <element signature="e#154#155#0" expanded="true" />
400
+            <element signature="e#200#201#0" expanded="true" />
401
+          </folding>
402
+        </state>
403
+      </provider>
404
+    </entry>
405
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
406
+      <provider selected="true" editor-type-id="text-editor">
407
+        <state relative-caret-position="1050">
408
+          <caret line="70" column="5" lean-forward="true" selection-start-line="70" selection-start-column="5" selection-end-line="70" selection-end-column="5" />
409
+          <folding>
410
+            <element signature="e#111#112#0" expanded="true" />
411
+            <element signature="e#163#164#0" expanded="true" />
412
+            <element signature="e#200#201#0" expanded="true" />
413
+            <element signature="e#255#256#0" expanded="true" />
414
+            <element signature="e#292#293#0" expanded="true" />
415
+            <element signature="e#325#326#0" expanded="true" />
416
+            <element signature="e#1611#1612#0" expanded="true" />
417
+            <element signature="e#1654#1655#0" expanded="true" />
418
+            <element signature="e#2100#2101#0" expanded="true" />
419
+            <element signature="e#2141#2142#0" expanded="true" />
420
+          </folding>
421
+        </state>
422
+      </provider>
423
+    </entry>
424
+    <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
425
+      <provider selected="true" editor-type-id="text-editor">
426
+        <state relative-caret-position="615">
427
+          <caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
428
+          <folding>
429
+            <element signature="e#233#234#0" expanded="true" />
430
+            <element signature="e#260#261#0" expanded="true" />
431
+            <element signature="e#299#300#0" expanded="true" />
432
+            <element signature="e#335#336#0" expanded="true" />
433
+            <element signature="e#372#373#0" expanded="true" />
434
+            <element signature="e#407#408#0" expanded="true" />
435
+            <element signature="e#442#443#0" expanded="true" />
436
+            <element signature="e#470#471#0" expanded="true" />
437
+            <element signature="e#499#500#0" expanded="true" />
438
+            <element signature="e#521#522#0" expanded="true" />
439
+          </folding>
440
+        </state>
441
+      </provider>
442
+    </entry>
443
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
444
+      <provider selected="true" editor-type-id="text-editor">
445
+        <state relative-caret-position="720">
446
+          <caret line="48" lean-forward="true" selection-start-line="48" selection-end-line="48" />
447
+          <folding>
448
+            <element signature="imports" expanded="true" />
449
+            <element signature="e#108#109#0" expanded="true" />
450
+            <element signature="e#142#143#0" expanded="true" />
451
+            <element signature="e#629#630#0" expanded="true" />
452
+            <element signature="e#650#651#0" expanded="true" />
453
+          </folding>
454
+        </state>
455
+      </provider>
456
+    </entry>
457
+  </component>
458
+</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>

+ 101
- 0
src/main/java/MyArrayList.java 查看文件

@@ -0,0 +1,101 @@
1
+public class MyArrayList<T> {
2
+
3
+    private T t;
4
+    private T[] myArrayList;
5
+
6
+    public MyArrayList(int size) {
7
+        this.myArrayList = (T[]) new Object[size];
8
+    }
9
+
10
+    public MyArrayList() {
11
+        this.myArrayList = (T[]) new Object[0];
12
+    }
13
+
14
+    public T[] getMyArrayList(){
15
+        return myArrayList;
16
+    }
17
+
18
+    public void add(T element){
19
+        T[] output = (T[]) new Object[myArrayList.length + 1];
20
+        for (int i = 0; i < myArrayList.length; i++) {
21
+            output[i] = myArrayList[i];
22
+        }
23
+        output[myArrayList.length] = element;
24
+
25
+        myArrayList = output;
26
+    }
27
+
28
+    public void add(int index, T element){
29
+        T[] output = (T[]) new Object[myArrayList.length + 1];
30
+        for (int i = 0; i < output.length; i++) {
31
+            if (i < index){
32
+                output[i] = myArrayList[i];
33
+            } else if (i > index){
34
+                output[i] = myArrayList[i - 1];
35
+            } else {
36
+                output[index] = element;
37
+            }
38
+        } myArrayList = output;
39
+    }
40
+
41
+    public T get(int index){
42
+        for (int i = 0; i < myArrayList.length; i++) {
43
+            if (i == index){
44
+                return myArrayList[i];
45
+            }
46
+        } return null;
47
+    }
48
+
49
+    public void remove(int index){
50
+        T[] output = (T[]) new Object[myArrayList.length - 1];
51
+        int counter = 0;
52
+
53
+        for (int i = 0; i < myArrayList.length; i++) {
54
+            if (i != index){
55
+                output[counter] = myArrayList[i];
56
+                counter++;
57
+            }
58
+        } myArrayList = output;
59
+    }
60
+
61
+    public void remove(T t){
62
+        T[] output = (T[]) new Object[myArrayList.length - 1];
63
+        int counter = 0;
64
+
65
+        for (int i = 0; i < myArrayList.length; i++) {
66
+            if (myArrayList[i] != t){
67
+                output[counter] = myArrayList[i];
68
+                counter++;
69
+            }
70
+        } myArrayList = output;
71
+    }
72
+
73
+    public void set(int index, T element) {
74
+        myArrayList[index] = element;
75
+    }
76
+
77
+    public void clear() {
78
+        T[] output = (T[]) new Object[0];
79
+        myArrayList = output;
80
+    }
81
+
82
+    public boolean isEmpty(){
83
+        if (myArrayList.length == 0){
84
+            return true;
85
+        } return false;
86
+    }
87
+
88
+    public boolean contains(T element){
89
+        for (int i = 0; i < myArrayList.length; i++){
90
+            if (element.equals(myArrayList[i])){
91
+                return true;
92
+            }
93
+        } return false;
94
+    }
95
+
96
+    public int size() {
97
+        return myArrayList.length;
98
+    }
99
+
100
+
101
+}

+ 45
- 0
src/main/java/MySet.java 查看文件

@@ -0,0 +1,45 @@
1
+public class MySet <T>{
2
+    MyArrayList set = new MyArrayList();
3
+
4
+    public boolean add(T t){
5
+        if (!set.contains(t)){
6
+            set.add(t);
7
+            return true;
8
+        } return false;
9
+    }
10
+
11
+    public void clear(){
12
+        set.clear();
13
+    }
14
+
15
+    public boolean contains(T t){
16
+        return set.contains(t);
17
+    }
18
+
19
+    public boolean isEmpty(){
20
+        return set.isEmpty();
21
+    }
22
+
23
+    public void remove(T t){
24
+        set.remove(t);
25
+    }
26
+
27
+    public int size(){
28
+        return set.size();
29
+    }
30
+
31
+    public T[] toArray() {
32
+        T[] output = (T[]) set.getMyArrayList();
33
+        return output;
34
+    }
35
+
36
+    public boolean containsAll(T[] t){
37
+        for (T each : t){
38
+            if (!set.contains(each)){
39
+                return false;
40
+            }
41
+        } return true;
42
+    }
43
+
44
+
45
+}

+ 51
- 0
src/test/java/MyArrayListTest.java 查看文件

@@ -0,0 +1,51 @@
1
+import org.junit.Assert;
2
+import org.junit.Before;
3
+import org.junit.Test;
4
+
5
+public class MyArrayListTest {
6
+
7
+    MyArrayList myArrayList;
8
+
9
+    @Before
10
+    public void setUp(){
11
+        myArrayList = new MyArrayList(10);
12
+    }
13
+
14
+    @Test
15
+    public void testSizeConstructor(){
16
+        int expected = 10;
17
+        int actual = myArrayList.size();
18
+
19
+        Assert.assertEquals(expected,actual);
20
+    }
21
+
22
+    @Test
23
+    public void addIntTest(){
24
+        myArrayList.add(1);
25
+
26
+        int expected = 11;
27
+        int actual = myArrayList.size();
28
+
29
+        Assert.assertEquals(expected,actual);
30
+    }
31
+
32
+    @Test
33
+    public void addStringTest(){
34
+        myArrayList.add("IAmDumb");
35
+
36
+        int expected = 11;
37
+        int actual = myArrayList.size();
38
+
39
+        Assert.assertEquals(expected,actual);
40
+    }
41
+
42
+    @Test
43
+    public void getIntTest(){
44
+        myArrayList.add(3);
45
+
46
+        Integer expected = 3;
47
+        Integer actual = (Integer) myArrayList.get(11);
48
+
49
+        Assert.assertEquals(expected,actual);
50
+    }
51
+}

+ 71
- 0
src/test/java/MySetTest.java 查看文件

@@ -0,0 +1,71 @@
1
+import org.junit.Assert;
2
+import org.junit.Before;
3
+import org.junit.Test;
4
+
5
+public class MySetTest {
6
+    MySet mySet;
7
+
8
+    @Before
9
+    public void setup(){
10
+        mySet = new MySet();
11
+    }
12
+
13
+    @Test
14
+    public void AddTest(){
15
+        mySet.add(1);
16
+
17
+        Assert.assertFalse(mySet.add(1));
18
+    }
19
+
20
+    @Test
21
+    public void ClearTest(){
22
+        mySet.add(1);
23
+        mySet.add(2);
24
+
25
+        Assert.assertTrue(mySet.contains(2));
26
+    }
27
+
28
+    @Test
29
+    public void ContainsTest(){
30
+        mySet.add(1);
31
+        mySet.add(2);
32
+
33
+        Assert.assertTrue(mySet.contains(2));
34
+    }
35
+
36
+    @Test
37
+    public void EmptyTest(){
38
+        Assert.assertTrue(mySet.isEmpty());
39
+    }
40
+
41
+    @Test
42
+    public void RemoveTest(){
43
+        mySet.add(1);
44
+        mySet.add(2);
45
+        mySet.remove(2);
46
+
47
+        Assert.assertEquals(3,mySet.size());
48
+    }
49
+
50
+    @Test
51
+    public void SizeTest(){
52
+        mySet.add(1);
53
+        mySet.add(2);
54
+
55
+        Integer[] expected = new Integer[]{1,2};
56
+        Assert.assertEquals(expected,mySet.toArray());
57
+    }
58
+
59
+    @Test
60
+    public void ToArrayTest(){
61
+        mySet.add(1);
62
+        mySet.add(2);
63
+        mySet.add(3);
64
+
65
+        Integer[] expected = new Integer[]{1,2,3};
66
+
67
+        Assert.assertEquals(expected,mySet.toArray());
68
+    }
69
+
70
+
71
+}