Ver código fonte

arraylist finished

jacob andersen 6 anos atrás
pai
commit
add4948d2f

+ 1
- 0
.idea/.name Ver arquivo

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

+ 16
- 0
.idea/compiler.xml Ver arquivo

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

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

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

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

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

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

+ 443
- 0
.idea/workspace.xml Ver arquivo

@@ -0,0 +1,443 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="39145ab9-fd44-4f67-802b-bf742dac378f" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
8
+    </list>
9
+    <ignored path="$PROJECT_DIR$/target/" />
10
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
11
+    <option name="SHOW_DIALOG" value="false" />
12
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
13
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
+    <option name="LAST_RESOLUTION" value="IGNORE" />
15
+  </component>
16
+  <component name="CoverageDataManager">
17
+    <SUITE FILE_PATH="coverage/generics$MyArrayListTest.ic" NAME="MyArrayListTest Coverage Results" MODIFIED="1542750913615" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
18
+    <SUITE FILE_PATH="coverage/generics$MyArrayListTest_addTest.ic" NAME="MyArrayListTest.addTest Coverage Results" MODIFIED="1542730582418" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
19
+    <SUITE FILE_PATH="coverage/generics$MyArrayListTest_getTest.ic" NAME="MyArrayListTest.getTest Coverage Results" MODIFIED="1542748413843" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
20
+    <SUITE FILE_PATH="coverage/generics$MyArrayListTest_isEmptyTest.ic" NAME="MyArrayListTest.isEmptyTest Coverage Results" MODIFIED="1542652661295" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
21
+  </component>
22
+  <component name="CoverageViewManager">
23
+    <option name="myElementSize" value="152" />
24
+  </component>
25
+  <component name="FUSProjectUsageTrigger">
26
+    <session id="1814500152">
27
+      <usages-collector id="statistics.lifecycle.project">
28
+        <counts>
29
+          <entry key="project.closed" value="10" />
30
+          <entry key="project.open.time.0" value="3" />
31
+          <entry key="project.open.time.1" value="4" />
32
+          <entry key="project.open.time.2" value="2" />
33
+          <entry key="project.open.time.3" value="1" />
34
+          <entry key="project.open.time.5" value="1" />
35
+          <entry key="project.opened" value="11" />
36
+        </counts>
37
+      </usages-collector>
38
+      <usages-collector id="statistics.file.types.open">
39
+        <counts>
40
+          <entry key="CLASS" value="11" />
41
+          <entry key="JAVA" value="5" />
42
+          <entry key="XML" value="2" />
43
+        </counts>
44
+      </usages-collector>
45
+      <usages-collector id="statistics.js.language.service.starts" />
46
+      <usages-collector id="statistics.vcs.git.usages" />
47
+      <usages-collector id="statistics.spring.boot.mvc.usages" />
48
+      <usages-collector id="statistics.spring.boot.run.usages" />
49
+      <usages-collector id="statistics.file.types.edit">
50
+        <counts>
51
+          <entry key="JAVA" value="4901" />
52
+        </counts>
53
+      </usages-collector>
54
+      <usages-collector id="statistics.file.extensions.open">
55
+        <counts>
56
+          <entry key="class" value="11" />
57
+          <entry key="java" value="5" />
58
+          <entry key="xml" value="2" />
59
+        </counts>
60
+      </usages-collector>
61
+      <usages-collector id="statistics.file.extensions.edit">
62
+        <counts>
63
+          <entry key="java" value="4901" />
64
+        </counts>
65
+      </usages-collector>
66
+    </session>
67
+  </component>
68
+  <component name="FileEditorManager">
69
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
70
+      <file pinned="false" current-in-tab="true">
71
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
72
+          <provider selected="true" editor-type-id="text-editor">
73
+            <state relative-caret-position="306">
74
+              <caret line="62" column="13" selection-start-line="62" selection-start-column="13" selection-end-line="62" selection-end-column="13" />
75
+              <folding>
76
+                <element signature="imports" expanded="true" />
77
+                <element signature="e#202#203#0" expanded="true" />
78
+                <element signature="e#221#222#0" expanded="true" />
79
+                <element signature="e#406#407#0" expanded="true" />
80
+                <element signature="e#446#447#0" expanded="true" />
81
+                <element signature="e#526#527#0" expanded="true" />
82
+                <element signature="e#555#556#0" expanded="true" />
83
+                <element signature="e#1362#1363#0" expanded="true" />
84
+                <element signature="e#1391#1392#0" expanded="true" />
85
+                <element signature="e#1434#1435#0" expanded="true" />
86
+                <element signature="e#1462#1463#0" expanded="true" />
87
+              </folding>
88
+            </state>
89
+          </provider>
90
+        </entry>
91
+      </file>
92
+      <file pinned="false" current-in-tab="false">
93
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
94
+          <provider selected="true" editor-type-id="text-editor">
95
+            <state relative-caret-position="525">
96
+              <caret line="35" selection-start-line="35" selection-end-line="35" />
97
+              <folding>
98
+                <element signature="imports" expanded="true" />
99
+              </folding>
100
+            </state>
101
+          </provider>
102
+        </entry>
103
+      </file>
104
+    </leaf>
105
+  </component>
106
+  <component name="FileTemplateManagerImpl">
107
+    <option name="RECENT_TEMPLATES">
108
+      <list>
109
+        <option value="Class" />
110
+      </list>
111
+    </option>
112
+  </component>
113
+  <component name="Git.Settings">
114
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
115
+  </component>
116
+  <component name="IdeDocumentHistory">
117
+    <option name="CHANGED_PATHS">
118
+      <list>
119
+        <option value="$PROJECT_DIR$/pom.xml" />
120
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
121
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
122
+      </list>
123
+    </option>
124
+  </component>
125
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
126
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
127
+  <component name="JsGulpfileManager">
128
+    <detection-done>true</detection-done>
129
+    <sorting>DEFINITION_ORDER</sorting>
130
+  </component>
131
+  <component name="MavenImportPreferences">
132
+    <option name="importingSettings">
133
+      <MavenImportingSettings>
134
+        <option name="importAutomatically" value="true" />
135
+      </MavenImportingSettings>
136
+    </option>
137
+  </component>
138
+  <component name="ProjectFrameBounds" fullScreen="true">
139
+    <option name="y" value="-1080" />
140
+    <option name="width" value="1920" />
141
+    <option name="height" value="1080" />
142
+  </component>
143
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
144
+  <component name="ProjectView">
145
+    <navigator proportions="" version="1">
146
+      <foldersAlwaysOnTop value="true" />
147
+    </navigator>
148
+    <panes>
149
+      <pane id="Scope" />
150
+      <pane id="PackagesPane" />
151
+      <pane id="ProjectPane">
152
+        <subPane>
153
+          <expand>
154
+            <path>
155
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
156
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
157
+            </path>
158
+            <path>
159
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
160
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
161
+              <item name="src" type="462c0819:PsiDirectoryNode" />
162
+            </path>
163
+            <path>
164
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
165
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
166
+              <item name="src" type="462c0819:PsiDirectoryNode" />
167
+              <item name="main" type="462c0819:PsiDirectoryNode" />
168
+            </path>
169
+            <path>
170
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
171
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
172
+              <item name="src" type="462c0819:PsiDirectoryNode" />
173
+              <item name="main" type="462c0819:PsiDirectoryNode" />
174
+              <item name="java" type="462c0819:PsiDirectoryNode" />
175
+            </path>
176
+            <path>
177
+              <item name="generics" type="b2602c69:ProjectViewProjectNode" />
178
+              <item name="CR-MicroLabs-Generics-MyArrayList" type="462c0819:PsiDirectoryNode" />
179
+              <item name="src" type="462c0819:PsiDirectoryNode" />
180
+              <item name="test" 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="test" type="462c0819:PsiDirectoryNode" />
187
+              <item name="java" type="462c0819:PsiDirectoryNode" />
188
+            </path>
189
+          </expand>
190
+          <select />
191
+        </subPane>
192
+      </pane>
193
+    </panes>
194
+  </component>
195
+  <component name="PropertiesComponent">
196
+    <property name="WebServerToolWindowFactoryState" value="false" />
197
+    <property name="aspect.path.notification.shown" value="true" />
198
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542750943115" />
199
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
200
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
201
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
202
+  </component>
203
+  <component name="RunDashboard">
204
+    <option name="ruleStates">
205
+      <list>
206
+        <RuleState>
207
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
208
+        </RuleState>
209
+        <RuleState>
210
+          <option name="name" value="StatusDashboardGroupingRule" />
211
+        </RuleState>
212
+      </list>
213
+    </option>
214
+  </component>
215
+  <component name="RunManager" selected="JUnit.MyArrayListTest">
216
+    <configuration name="MyArrayListTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
217
+      <module name="generics" />
218
+      <option name="PACKAGE_NAME" value="" />
219
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
220
+      <method v="2">
221
+        <option name="Make" enabled="true" />
222
+      </method>
223
+    </configuration>
224
+    <configuration name="MyArrayListTest.addTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
225
+      <module name="generics" />
226
+      <option name="PACKAGE_NAME" value="" />
227
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
228
+      <option name="METHOD_NAME" value="addTest" />
229
+      <option name="TEST_OBJECT" value="method" />
230
+      <method v="2">
231
+        <option name="Make" enabled="true" />
232
+      </method>
233
+    </configuration>
234
+    <configuration name="MyArrayListTest.getTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
235
+      <module name="generics" />
236
+      <option name="PACKAGE_NAME" value="" />
237
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
238
+      <option name="METHOD_NAME" value="getTest" />
239
+      <option name="TEST_OBJECT" value="method" />
240
+      <method v="2">
241
+        <option name="Make" enabled="true" />
242
+      </method>
243
+    </configuration>
244
+    <configuration name="MyArrayListTest.isEmptyTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
245
+      <module name="generics" />
246
+      <option name="PACKAGE_NAME" value="" />
247
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
248
+      <option name="METHOD_NAME" value="isEmptyTest" />
249
+      <option name="TEST_OBJECT" value="method" />
250
+      <method v="2">
251
+        <option name="Make" enabled="true" />
252
+      </method>
253
+    </configuration>
254
+    <list>
255
+      <item itemvalue="JUnit.MyArrayListTest" />
256
+      <item itemvalue="JUnit.MyArrayListTest.isEmptyTest" />
257
+      <item itemvalue="JUnit.MyArrayListTest.addTest" />
258
+      <item itemvalue="JUnit.MyArrayListTest.getTest" />
259
+    </list>
260
+    <recent_temporary>
261
+      <list>
262
+        <item itemvalue="JUnit.MyArrayListTest" />
263
+        <item itemvalue="JUnit.MyArrayListTest.getTest" />
264
+        <item itemvalue="JUnit.MyArrayListTest.addTest" />
265
+        <item itemvalue="JUnit.MyArrayListTest.isEmptyTest" />
266
+      </list>
267
+    </recent_temporary>
268
+  </component>
269
+  <component name="SvnConfiguration">
270
+    <configuration />
271
+  </component>
272
+  <component name="TaskManager">
273
+    <task active="true" id="Default" summary="Default task">
274
+      <changelist id="39145ab9-fd44-4f67-802b-bf742dac378f" name="Default Changelist" comment="" />
275
+      <created>1542146316892</created>
276
+      <option name="number" value="Default" />
277
+      <option name="presentableId" value="Default" />
278
+      <updated>1542146316892</updated>
279
+      <workItem from="1542146318296" duration="103000" />
280
+      <workItem from="1542146668851" duration="3922000" />
281
+      <workItem from="1542218568757" duration="5000" />
282
+      <workItem from="1542218731672" duration="251000" />
283
+      <workItem from="1542226176182" duration="941000" />
284
+      <workItem from="1542327238676" duration="529000" />
285
+      <workItem from="1542374524937" duration="5738000" />
286
+      <workItem from="1542415574399" duration="920000" />
287
+      <workItem from="1542502906234" duration="2774000" />
288
+      <workItem from="1542633995805" duration="8303000" />
289
+      <workItem from="1542726706465" duration="17586000" />
290
+    </task>
291
+    <servers />
292
+  </component>
293
+  <component name="TestHistory">
294
+    <history-entry file="MyArrayListTest - 2018.11.20 at 15h 55m 01s.xml">
295
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
296
+    </history-entry>
297
+    <history-entry file="MyArrayListTest_addTest - 2018.11.20 at 16h 04m 18s.xml">
298
+      <configuration name="MyArrayListTest.addTest" configurationId="JUnit" />
299
+    </history-entry>
300
+    <history-entry file="MyArrayListTest_getTest - 2018.11.20 at 16h 05m 07s.xml">
301
+      <configuration name="MyArrayListTest.getTest" configurationId="JUnit" />
302
+    </history-entry>
303
+    <history-entry file="MyArrayListTest_getTest - 2018.11.20 at 16h 12m 39s.xml">
304
+      <configuration name="MyArrayListTest.getTest" configurationId="JUnit" />
305
+    </history-entry>
306
+    <history-entry file="MyArrayListTest_getTest - 2018.11.20 at 16h 13m 30s.xml">
307
+      <configuration name="MyArrayListTest.getTest" configurationId="JUnit" />
308
+    </history-entry>
309
+    <history-entry file="MyArrayListTest_getTest - 2018.11.20 at 16h 13m 36s.xml">
310
+      <configuration name="MyArrayListTest.getTest" configurationId="JUnit" />
311
+    </history-entry>
312
+    <history-entry file="MyArrayListTest - 2018.11.20 at 16h 13m 53s.xml">
313
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
314
+    </history-entry>
315
+    <history-entry file="MyArrayListTest - 2018.11.20 at 16h 14m 24s.xml">
316
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
317
+    </history-entry>
318
+    <history-entry file="MyArrayListTest - 2018.11.20 at 16h 22m 24s.xml">
319
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
320
+    </history-entry>
321
+    <history-entry file="MyArrayListTest - 2018.11.20 at 16h 48m 07s.xml">
322
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
323
+    </history-entry>
324
+  </component>
325
+  <component name="TimeTrackingManager">
326
+    <option name="totallyTimeSpent" value="41072000" />
327
+  </component>
328
+  <component name="ToolWindowManager">
329
+    <frame x="0" y="-1080" width="1920" height="1080" extended-state="0" />
330
+    <editor active="true" />
331
+    <layout>
332
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.14589989" />
333
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
334
+      <window_info id="Image Layers" order="2" />
335
+      <window_info id="Designer" order="3" />
336
+      <window_info id="UI Designer" order="4" />
337
+      <window_info id="Capture Tool" order="5" />
338
+      <window_info id="Favorites" order="6" side_tool="true" />
339
+      <window_info anchor="bottom" id="Message" order="0" />
340
+      <window_info anchor="bottom" id="Find" order="1" />
341
+      <window_info anchor="bottom" id="Run" order="2" weight="0.24752475" />
342
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
343
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
344
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
345
+      <window_info anchor="bottom" id="TODO" order="6" />
346
+      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
347
+      <window_info anchor="bottom" id="Terminal" order="8" />
348
+      <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
349
+      <window_info anchor="bottom" id="Version Control" order="10" show_stripe_button="false" />
350
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.629703" />
351
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
352
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
353
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
354
+      <window_info anchor="right" id="Palette" order="3" />
355
+      <window_info anchor="right" id="Capture Analysis" order="4" />
356
+      <window_info anchor="right" id="Theme Preview" order="5" />
357
+      <window_info anchor="right" id="Palette&#9;" order="6" />
358
+      <window_info anchor="right" id="Database" order="7" />
359
+      <window_info anchor="right" id="Maven Projects" order="8" />
360
+      <window_info anchor="right" id="Coverage" order="9" side_tool="true" visible="true" weight="0.21671991" />
361
+    </layout>
362
+  </component>
363
+  <component name="TypeScriptGeneratedFilesManager">
364
+    <option name="version" value="1" />
365
+  </component>
366
+  <component name="VcsContentAnnotationSettings">
367
+    <option name="myLimit" value="2678400000" />
368
+  </component>
369
+  <component name="XDebuggerManager">
370
+    <breakpoint-manager>
371
+      <breakpoints>
372
+        <line-breakpoint enabled="true" type="java-method">
373
+          <url>file://$PROJECT_DIR$/src/main/java/MyArrayList.java</url>
374
+          <line>41</line>
375
+          <properties class="MyArrayList" method="add">
376
+            <option name="EMULATED" value="true" />
377
+          </properties>
378
+          <option name="timeStamp" value="8" />
379
+        </line-breakpoint>
380
+      </breakpoints>
381
+    </breakpoint-manager>
382
+  </component>
383
+  <component name="editorHistoryManager">
384
+    <entry file="file://$PROJECT_DIR$/pom.xml">
385
+      <provider selected="true" editor-type-id="text-editor">
386
+        <state relative-caret-position="420">
387
+          <caret line="28" column="4" selection-start-line="28" selection-start-column="4" selection-end-line="28" selection-end-column="4" />
388
+        </state>
389
+      </provider>
390
+    </entry>
391
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/ParentRunner.class">
392
+      <provider selected="true" editor-type-id="text-editor">
393
+        <state relative-caret-position="193">
394
+          <caret line="202" selection-start-line="202" selection-end-line="202" />
395
+        </state>
396
+      </provider>
397
+    </entry>
398
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/model/FrameworkMethod.class">
399
+      <provider selected="true" editor-type-id="text-editor">
400
+        <state relative-caret-position="315">
401
+          <caret line="31" selection-start-line="31" selection-end-line="31" />
402
+        </state>
403
+      </provider>
404
+    </entry>
405
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
406
+      <provider selected="true" editor-type-id="text-editor">
407
+        <state relative-caret-position="195">
408
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
409
+        </state>
410
+      </provider>
411
+    </entry>
412
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
413
+      <provider selected="true" editor-type-id="text-editor">
414
+        <state relative-caret-position="525">
415
+          <caret line="35" selection-start-line="35" selection-end-line="35" />
416
+          <folding>
417
+            <element signature="imports" expanded="true" />
418
+          </folding>
419
+        </state>
420
+      </provider>
421
+    </entry>
422
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
423
+      <provider selected="true" editor-type-id="text-editor">
424
+        <state relative-caret-position="306">
425
+          <caret line="62" column="13" selection-start-line="62" selection-start-column="13" selection-end-line="62" selection-end-column="13" />
426
+          <folding>
427
+            <element signature="imports" expanded="true" />
428
+            <element signature="e#202#203#0" expanded="true" />
429
+            <element signature="e#221#222#0" expanded="true" />
430
+            <element signature="e#406#407#0" expanded="true" />
431
+            <element signature="e#446#447#0" expanded="true" />
432
+            <element signature="e#526#527#0" expanded="true" />
433
+            <element signature="e#555#556#0" expanded="true" />
434
+            <element signature="e#1362#1363#0" expanded="true" />
435
+            <element signature="e#1391#1392#0" expanded="true" />
436
+            <element signature="e#1434#1435#0" expanded="true" />
437
+            <element signature="e#1462#1463#0" expanded="true" />
438
+          </folding>
439
+        </state>
440
+      </provider>
441
+    </entry>
442
+  </component>
443
+</project>

+ 16
- 0
generics.iml Ver arquivo

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

+ 2
- 3
pom.xml Ver arquivo

@@ -20,12 +20,11 @@
20 20
         </plugins>
21 21
     </build>
22 22
     <dependencies>
23
-
24
-
25 23
         <dependency>
26 24
             <groupId>junit</groupId>
27 25
             <artifactId>junit</artifactId>
28
-            <version>RELEASE</version>
26
+            <version>4.12</version>
27
+            <scope>test</scope>
29 28
         </dependency>
30 29
     </dependencies>
31 30
 

+ 140
- 0
src/main/java/MyArrayList.java Ver arquivo

@@ -0,0 +1,140 @@
1
+import java.lang.reflect.Array;
2
+import java.util.Arrays;
3
+
4
+public class MyArrayList <T>
5
+{
6
+    private T []arr;
7
+    private int actualsize=0;
8
+
9
+    public MyArrayList()
10
+    {
11
+        this(10);
12
+    }
13
+
14
+    public MyArrayList(int length)
15
+    {
16
+        arr = (T[])new Object[length];
17
+    }
18
+
19
+    public int size ()
20
+    {
21
+    return actualsize;
22
+    }
23
+
24
+    public void add(T e)
25
+    {
26
+        if (actualsize==arr.length)
27
+        {
28
+            Object[]temp=new Object[arr.length+1];
29
+            for (int i=0;i<arr.length;i++)
30
+            {
31
+                temp[i]=arr[i];
32
+            }
33
+
34
+            arr=(T[])temp;
35
+        }
36
+        arr[actualsize]=e;
37
+        actualsize++;
38
+    }
39
+
40
+
41
+
42
+    public void add(int index, T e)
43
+    {
44
+            //if (actualsize==arr.length)
45
+            //{
46
+                Object[] temp = new Object[arr.length + 1];
47
+                for (int i = 0; i < arr.length; i++)
48
+                {
49
+                    temp[i] = arr[i];
50
+                }
51
+
52
+                for(int i=0;i<index;i++)
53
+                {
54
+                    temp[i]=arr[i];
55
+                }
56
+                temp[index]=e;
57
+                for (int i=index+1;i<arr.length;i++)
58
+                {
59
+                    temp[i]=arr[i-1];
60
+                }
61
+                arr = (T[]) temp;
62
+                actualsize++;
63
+            }
64
+
65
+
66
+
67
+    public T get(int index)
68
+    {
69
+    return arr[index];
70
+    }
71
+
72
+    public void set(int index, T e)
73
+    {
74
+        arr[index]=e;
75
+    }
76
+
77
+    public void clear()
78
+    {
79
+        for (int i=0;i<arr.length-1;i++)
80
+        {
81
+            arr[i]=null;
82
+        }
83
+        actualsize=0;
84
+    }
85
+
86
+    public boolean isEmpty()
87
+    { for(int i=0;i<arr.length;i++)
88
+    {
89
+      if (actualsize==0)
90
+      {
91
+          return true;
92
+      }
93
+    }
94
+    return false;
95
+    }
96
+
97
+    public boolean contains(T e)
98
+    {
99
+        for (int i=0;i<arr.length-1;i++)
100
+        {
101
+            if (arr[i]==e)
102
+            {
103
+                return true;
104
+            }
105
+        }
106
+        return false;
107
+    }
108
+
109
+    public void remove(T e) {
110
+        {
111
+            int count=0;
112
+            Object[] temp = new Object[arr.length - 1];
113
+            for (int i = 0; i < actualsize; i++) {
114
+                if (!arr[i].equals(e))
115
+                {
116
+                    temp[count] = arr[i];
117
+                    count++;
118
+                }
119
+            }
120
+            arr = (T[])temp;
121
+            actualsize--;
122
+        }
123
+    }
124
+
125
+    public void remove(int index, T e)
126
+    {
127
+        int count=0;
128
+        Object[] temp = new Object[arr.length - 1];
129
+        for (int i = 0; i < actualsize; i++) {
130
+            if (index!=i)
131
+            {
132
+                temp[count] = arr[i];
133
+                count++;
134
+            }
135
+        }
136
+        arr = (T[]) temp;
137
+        actualsize--;
138
+    }
139
+
140
+}

+ 183
- 0
src/test/java/MyArrayListTest.java Ver arquivo

@@ -0,0 +1,183 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+public class MyArrayListTest {
5
+    @Test
6
+    public void addTest()
7
+    {
8
+        //Given
9
+
10
+        MyArrayList <String> newlist = new MyArrayList();
11
+
12
+        //When
13
+        newlist.add("eric");
14
+        newlist.add("benny");
15
+        newlist.add("johnny");
16
+        newlist.add("iglesias");
17
+
18
+        //Then
19
+
20
+        String expected = "iglesias";
21
+        String actual = newlist.get(3);
22
+        Assert.assertEquals(expected,actual);
23
+    }
24
+    @Test
25
+    public void addAtIndexTest()
26
+    {
27
+        MyArrayList <String> newlist = new MyArrayList(3);
28
+        newlist.add(0,"elephant");
29
+        newlist.add(1,"giraffe");
30
+        newlist.add(2,"tiger");
31
+        newlist.add(3,"gazelle");
32
+
33
+        String expected = "elephant";
34
+        String actual = newlist.get(0);
35
+
36
+        Assert.assertEquals(expected,actual);
37
+    }
38
+    @Test
39
+    public void removeTest()
40
+    {
41
+        MyArrayList <String> newlist = new MyArrayList();
42
+
43
+        //When
44
+        newlist.add("eric");
45
+        newlist.add("benny");
46
+        newlist.add("johnny");
47
+        newlist.add("iglesias");
48
+        newlist.remove("benny");
49
+        //Then
50
+
51
+        boolean expected = false;
52
+        boolean actual = newlist.contains("benny");
53
+        Assert.assertEquals(expected,actual);
54
+    }
55
+
56
+    @Test
57
+    public void removeWithIndexTest()
58
+    {
59
+        MyArrayList <String> newlist = new MyArrayList();
60
+
61
+        //When
62
+        newlist.add("eric");
63
+        newlist.add("benny");
64
+        newlist.add("johnny");
65
+        newlist.add("iglesias");
66
+        newlist.remove(2,"johnny");
67
+        //Then
68
+
69
+        boolean expected = false;
70
+        boolean actual = newlist.contains("johnny");
71
+        Assert.assertEquals(expected,actual);
72
+    }
73
+
74
+
75
+
76
+    @Test
77
+        public void sizeTest()
78
+        {
79
+            MyArrayList <String> newlist = new MyArrayList();
80
+            newlist.add("elephant");
81
+
82
+            int expected = 1;
83
+            int actual = newlist.size();
84
+
85
+            Assert.assertEquals(expected,actual);
86
+        }
87
+
88
+        @Test
89
+    public void setTest()
90
+        {
91
+            MyArrayList <String> newlist = new MyArrayList();
92
+            newlist.set(0,"elephant");
93
+
94
+            String expected = "elephant";
95
+            String actual = newlist.get(0);
96
+
97
+            Assert.assertEquals(expected,actual);
98
+        }
99
+
100
+        @Test
101
+    public void getTest()
102
+        {
103
+            MyArrayList <String> newlist = new MyArrayList();
104
+            newlist.add("elephant");
105
+
106
+            String expected = "elephant";
107
+            String actual = newlist.get(0);
108
+
109
+            Assert.assertEquals(expected,actual);
110
+        }
111
+
112
+        @Test
113
+    public void clearTest()
114
+        {
115
+            MyArrayList <Integer> newlist = new MyArrayList();
116
+            for (int i=0; i<10;i++)
117
+            {
118
+                newlist.add(i);
119
+            }
120
+
121
+            newlist.clear();
122
+
123
+            int expected = 0;
124
+            int actual = newlist.size();
125
+
126
+            Assert.assertEquals(expected,actual);
127
+        }
128
+
129
+        @Test
130
+    public void isEmptyFalseTest()
131
+        {
132
+            MyArrayList <Integer> newlist = new MyArrayList();
133
+            newlist.add(23);
134
+
135
+            boolean expected = false;
136
+            boolean actual = newlist.isEmpty();
137
+
138
+            Assert.assertEquals(expected,actual);
139
+        }
140
+
141
+    @Test
142
+    public void isEmptyTrueTest()
143
+    {
144
+        MyArrayList <Integer> newlist = new MyArrayList();
145
+        newlist.add(23);
146
+        newlist.remove(23);
147
+
148
+        boolean expected = true;
149
+        boolean actual = newlist.isEmpty();
150
+
151
+        Assert.assertEquals(expected,actual);
152
+    }
153
+
154
+
155
+
156
+        @Test
157
+    public void containsTest()
158
+        {
159
+            MyArrayList <String> newlist = new MyArrayList();
160
+            newlist.add("elephant");
161
+
162
+            boolean expected = true;
163
+            boolean actual = newlist.contains("elephant");
164
+
165
+            Assert.assertEquals(expected,actual);
166
+        }
167
+
168
+        @Test
169
+    public void myArrayListLengthTest()
170
+        {
171
+            MyArrayList <String> newlist = new MyArrayList(5);
172
+            newlist.add("elephant");
173
+            newlist.add("eric");
174
+            newlist.add("jenga");
175
+
176
+            int expected = 3;
177
+            int actual = newlist.size();
178
+
179
+            Assert.assertEquals(expected,actual);
180
+        }
181
+}
182
+
183
+