Browse Source

need to fix an error

thulasi 6 years ago
parent
commit
5b4f7e2d58

+ 1
- 0
.idea/.name View File

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

+ 16
- 0
.idea/compiler.xml View File

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

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

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

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

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

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

+ 521
- 0
.idea/workspace.xml View File

@@ -0,0 +1,521 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="6a8e162c-afd9-4415-8c4f-40bb1a6f9e53" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/MyArrayList.java" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/src/main/java/MySet.java" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" afterDir="false" />
9
+    </list>
10
+    <ignored path="$PROJECT_DIR$/target/" />
11
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
12
+    <option name="SHOW_DIALOG" value="false" />
13
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
14
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
15
+    <option name="LAST_RESOLUTION" value="IGNORE" />
16
+  </component>
17
+  <component name="FUSProjectUsageTrigger">
18
+    <session id="-321049765">
19
+      <usages-collector id="statistics.lifecycle.project">
20
+        <counts>
21
+          <entry key="project.open.time.2" value="1" />
22
+          <entry key="project.opened" value="1" />
23
+        </counts>
24
+      </usages-collector>
25
+      <usages-collector id="statistics.file.extensions.open">
26
+        <counts>
27
+          <entry key="class" value="1" />
28
+          <entry key="java" value="5" />
29
+        </counts>
30
+      </usages-collector>
31
+      <usages-collector id="statistics.file.types.open">
32
+        <counts>
33
+          <entry key="CLASS" value="1" />
34
+          <entry key="JAVA" value="5" />
35
+        </counts>
36
+      </usages-collector>
37
+      <usages-collector id="statistics.file.extensions.edit">
38
+        <counts>
39
+          <entry key="java" value="2576" />
40
+        </counts>
41
+      </usages-collector>
42
+      <usages-collector id="statistics.file.types.edit">
43
+        <counts>
44
+          <entry key="JAVA" value="2576" />
45
+        </counts>
46
+      </usages-collector>
47
+    </session>
48
+  </component>
49
+  <component name="FileEditorManager">
50
+    <leaf>
51
+      <file pinned="false" current-in-tab="false">
52
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
53
+          <provider selected="true" editor-type-id="text-editor">
54
+            <state relative-caret-position="276">
55
+              <caret line="34" column="25" lean-forward="true" selection-start-line="34" selection-start-column="25" selection-end-line="34" selection-end-column="25" />
56
+              <folding>
57
+                <element signature="imports" expanded="true" />
58
+                <element signature="e#205#206#0" expanded="true" />
59
+                <element signature="e#249#250#0" expanded="true" />
60
+                <element signature="e#285#286#0" expanded="true" />
61
+                <element signature="e#332#333#0" expanded="true" />
62
+                <element signature="e#1757#1758#0" expanded="true" />
63
+                <element signature="e#1796#1797#0" expanded="true" />
64
+                <element signature="e#2158#2159#0" expanded="true" />
65
+                <element signature="e#2195#2196#0" expanded="true" />
66
+              </folding>
67
+            </state>
68
+          </provider>
69
+        </entry>
70
+      </file>
71
+      <file pinned="false" current-in-tab="false">
72
+        <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
73
+          <provider selected="true" editor-type-id="text-editor">
74
+            <state relative-caret-position="322">
75
+              <caret line="91" column="1" lean-forward="true" selection-end-line="91" selection-end-column="1" />
76
+              <folding>
77
+                <element signature="imports" expanded="true" />
78
+              </folding>
79
+            </state>
80
+          </provider>
81
+        </entry>
82
+      </file>
83
+      <file pinned="false" current-in-tab="false">
84
+        <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
85
+          <provider selected="true" editor-type-id="text-editor">
86
+            <state relative-caret-position="183">
87
+              <caret line="19" selection-start-line="19" selection-end-line="19" />
88
+              <folding>
89
+                <element signature="e#131#132#0" expanded="true" />
90
+                <element signature="e#175#176#0" expanded="true" />
91
+                <element signature="e#211#212#0" expanded="true" />
92
+                <element signature="e#258#259#0" expanded="true" />
93
+                <element signature="e#1625#1626#0" expanded="true" />
94
+                <element signature="e#1718#1719#0" expanded="true" />
95
+                <element signature="e#2068#2069#0" expanded="true" />
96
+                <element signature="e#2106#2107#0" expanded="true" />
97
+              </folding>
98
+            </state>
99
+          </provider>
100
+        </entry>
101
+      </file>
102
+      <file pinned="false" current-in-tab="true">
103
+        <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
104
+          <provider selected="true" editor-type-id="text-editor">
105
+            <state relative-caret-position="1290">
106
+              <caret line="86" selection-start-line="86" selection-end-line="86" />
107
+              <folding>
108
+                <element signature="imports" expanded="true" />
109
+              </folding>
110
+            </state>
111
+          </provider>
112
+        </entry>
113
+      </file>
114
+    </leaf>
115
+  </component>
116
+  <component name="FileTemplateManagerImpl">
117
+    <option name="RECENT_TEMPLATES">
118
+      <list>
119
+        <option value="Class" />
120
+      </list>
121
+    </option>
122
+  </component>
123
+  <component name="FindInProjectRecents">
124
+    <findStrings>
125
+      <find>mySet</find>
126
+    </findStrings>
127
+  </component>
128
+  <component name="Git.Settings">
129
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
130
+  </component>
131
+  <component name="IdeDocumentHistory">
132
+    <option name="CHANGED_PATHS">
133
+      <list>
134
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
135
+        <option value="$PROJECT_DIR$/src/main/java/mySet.java" />
136
+        <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
137
+        <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
138
+        <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
139
+      </list>
140
+    </option>
141
+  </component>
142
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
143
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
144
+  <component name="JsGulpfileManager">
145
+    <detection-done>true</detection-done>
146
+    <sorting>DEFINITION_ORDER</sorting>
147
+  </component>
148
+  <component name="ProjectFrameBounds">
149
+    <option name="y" value="23" />
150
+    <option name="width" value="1280" />
151
+    <option name="height" value="709" />
152
+  </component>
153
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
154
+  <component name="ProjectView">
155
+    <navigator currentView="Scope" currentSubView="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope" proportions="" version="1">
156
+      <foldersAlwaysOnTop value="true" />
157
+    </navigator>
158
+    <panes>
159
+      <pane id="Scope">
160
+        <subPane subId="Scope 'Tests'; set:Tests; class com.intellij.psi.search.scope.TestsScope">
161
+          <expand>
162
+            <path>
163
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
164
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
165
+            </path>
166
+            <path>
167
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
168
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
169
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
170
+            </path>
171
+            <path>
172
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
173
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
174
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
175
+              <item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
176
+            </path>
177
+            <path>
178
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
179
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
180
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
181
+              <item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
182
+              <item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
183
+            </path>
184
+          </expand>
185
+          <select />
186
+        </subPane>
187
+        <subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope">
188
+          <expand>
189
+            <path>
190
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
191
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
192
+            </path>
193
+            <path>
194
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
195
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
196
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
197
+            </path>
198
+            <path>
199
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
200
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
201
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
202
+              <item name="main" type="9f88c78c:ScopeViewTreeModel$FileNode" />
203
+            </path>
204
+            <path>
205
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
206
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
207
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
208
+              <item name="main" type="9f88c78c:ScopeViewTreeModel$FileNode" />
209
+              <item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
210
+            </path>
211
+            <path>
212
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
213
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
214
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
215
+              <item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
216
+            </path>
217
+            <path>
218
+              <item name="generics" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
219
+              <item name="generics" type="2674bda8:ScopeViewTreeModel$GroupNode" />
220
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
221
+              <item name="test" type="9f88c78c:ScopeViewTreeModel$FileNode" />
222
+              <item name="java" type="9f88c78c:ScopeViewTreeModel$FileNode" />
223
+            </path>
224
+          </expand>
225
+          <select />
226
+        </subPane>
227
+      </pane>
228
+      <pane id="PackagesPane">
229
+        <subPane>
230
+          <expand>
231
+            <path>
232
+              <item name="generics" type="58d84e3e:PackageViewProjectNode" />
233
+              <item name="generics" type="616d4139:PackageViewModuleNode" />
234
+            </path>
235
+          </expand>
236
+          <select />
237
+        </subPane>
238
+      </pane>
239
+      <pane id="ProjectPane" />
240
+    </panes>
241
+  </component>
242
+  <component name="PropertiesComponent">
243
+    <property name="WebServerToolWindowFactoryState" value="false" />
244
+    <property name="aspect.path.notification.shown" value="true" />
245
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542167013031" />
246
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
247
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
248
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
249
+  </component>
250
+  <component name="RunDashboard">
251
+    <option name="ruleStates">
252
+      <list>
253
+        <RuleState>
254
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
255
+        </RuleState>
256
+        <RuleState>
257
+          <option name="name" value="StatusDashboardGroupingRule" />
258
+        </RuleState>
259
+      </list>
260
+    </option>
261
+  </component>
262
+  <component name="RunManager" selected="JUnit.MySetTest">
263
+    <configuration name="MyArrayListTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
264
+      <module name="generics" />
265
+      <option name="PACKAGE_NAME" value="" />
266
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
267
+      <method v="2">
268
+        <option name="Make" enabled="true" />
269
+      </method>
270
+    </configuration>
271
+    <configuration name="MyArrayListTest.testAddAtIndex" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272
+      <module name="generics" />
273
+      <option name="PACKAGE_NAME" value="" />
274
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
275
+      <option name="METHOD_NAME" value="testAddAtIndex" />
276
+      <option name="TEST_OBJECT" value="method" />
277
+      <method v="2">
278
+        <option name="Make" enabled="true" />
279
+      </method>
280
+    </configuration>
281
+    <configuration name="MyArrayListTest.testRemove2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
282
+      <module name="generics" />
283
+      <option name="PACKAGE_NAME" value="" />
284
+      <option name="MAIN_CLASS_NAME" value="MyArrayListTest" />
285
+      <option name="METHOD_NAME" value="testRemove2" />
286
+      <option name="TEST_OBJECT" value="method" />
287
+      <method v="2">
288
+        <option name="Make" enabled="true" />
289
+      </method>
290
+    </configuration>
291
+    <configuration name="MyArrayListTest.testSet" 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="MyArrayListTest" />
295
+      <option name="METHOD_NAME" value="testSet" />
296
+      <option name="TEST_OBJECT" value="method" />
297
+      <method v="2">
298
+        <option name="Make" enabled="true" />
299
+      </method>
300
+    </configuration>
301
+    <configuration name="MySetTest" 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="MySetTest" />
305
+      <method v="2">
306
+        <option name="Make" enabled="true" />
307
+      </method>
308
+    </configuration>
309
+    <list>
310
+      <item itemvalue="JUnit.MyArrayListTest" />
311
+      <item itemvalue="JUnit.MyArrayListTest.testRemove2" />
312
+      <item itemvalue="JUnit.MyArrayListTest.testSet" />
313
+      <item itemvalue="JUnit.MyArrayListTest.testAddAtIndex" />
314
+      <item itemvalue="JUnit.MySetTest" />
315
+    </list>
316
+    <recent_temporary>
317
+      <list>
318
+        <item itemvalue="JUnit.MySetTest" />
319
+        <item itemvalue="JUnit.MyArrayListTest.testAddAtIndex" />
320
+        <item itemvalue="JUnit.MyArrayListTest" />
321
+        <item itemvalue="JUnit.MyArrayListTest.testSet" />
322
+        <item itemvalue="JUnit.MyArrayListTest.testRemove2" />
323
+      </list>
324
+    </recent_temporary>
325
+  </component>
326
+  <component name="SvnConfiguration">
327
+    <configuration />
328
+  </component>
329
+  <component name="TaskManager">
330
+    <task active="true" id="Default" summary="Default task">
331
+      <changelist id="6a8e162c-afd9-4415-8c4f-40bb1a6f9e53" name="Default Changelist" comment="" />
332
+      <created>1542144297867</created>
333
+      <option name="number" value="Default" />
334
+      <option name="presentableId" value="Default" />
335
+      <updated>1542144297867</updated>
336
+      <workItem from="1542144301266" duration="15755000" />
337
+    </task>
338
+    <servers />
339
+  </component>
340
+  <component name="TestHistory">
341
+    <history-entry file="MyArrayListTest - 2018.11.13 at 21h 55m 32s.xml">
342
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
343
+    </history-entry>
344
+    <history-entry file="MyArrayListTest_testAddAtIndex - 2018.11.13 at 22h 03m 47s.xml">
345
+      <configuration name="MyArrayListTest.testAddAtIndex" configurationId="JUnit" />
346
+    </history-entry>
347
+    <history-entry file="MyArrayListTest_testAddAtIndex - 2018.11.13 at 22h 04m 45s.xml">
348
+      <configuration name="MyArrayListTest.testAddAtIndex" configurationId="JUnit" />
349
+    </history-entry>
350
+    <history-entry file="MyArrayListTest_testAddAtIndex - 2018.11.13 at 22h 13m 22s.xml">
351
+      <configuration name="MyArrayListTest.testAddAtIndex" configurationId="JUnit" />
352
+    </history-entry>
353
+    <history-entry file="MyArrayListTest_testAddAtIndex - 2018.11.13 at 22h 16m 48s.xml">
354
+      <configuration name="MyArrayListTest.testAddAtIndex" configurationId="JUnit" />
355
+    </history-entry>
356
+    <history-entry file="MySetTest - 2018.11.13 at 22h 34m 46s.xml">
357
+      <configuration name="MySetTest" configurationId="JUnit" />
358
+    </history-entry>
359
+    <history-entry file="MySetTest - 2018.11.13 at 22h 40m 00s.xml">
360
+      <configuration name="MySetTest" configurationId="JUnit" />
361
+    </history-entry>
362
+    <history-entry file="MySetTest - 2018.11.13 at 22h 41m 16s.xml">
363
+      <configuration name="MySetTest" configurationId="JUnit" />
364
+    </history-entry>
365
+    <history-entry file="MySetTest - 2018.11.13 at 22h 42m 39s.xml">
366
+      <configuration name="MySetTest" configurationId="JUnit" />
367
+    </history-entry>
368
+    <history-entry file="MySetTest - 2018.11.13 at 22h 43m 32s.xml">
369
+      <configuration name="MySetTest" configurationId="JUnit" />
370
+    </history-entry>
371
+  </component>
372
+  <component name="TimeTrackingManager">
373
+    <option name="totallyTimeSpent" value="15755000" />
374
+  </component>
375
+  <component name="ToolWindowManager">
376
+    <frame x="0" y="23" width="1280" height="709" extended-state="0" />
377
+    <editor active="true" />
378
+    <layout>
379
+      <window_info id="Image Layers" />
380
+      <window_info id="Designer" />
381
+      <window_info id="UI Designer" />
382
+      <window_info id="Capture Tool" />
383
+      <window_info id="Favorites" side_tool="true" />
384
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.16235864" />
385
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
386
+      <window_info anchor="bottom" id="Messages" weight="0.32901135" />
387
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
388
+      <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
389
+      <window_info anchor="bottom" id="Terminal" />
390
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
391
+      <window_info anchor="bottom" id="Message" order="0" />
392
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32901135" />
393
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32901135" />
394
+      <window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.3987034" />
395
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
396
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
397
+      <window_info anchor="bottom" id="TODO" order="6" />
398
+      <window_info anchor="right" id="Palette" />
399
+      <window_info anchor="right" id="Theme Preview" />
400
+      <window_info anchor="right" id="Capture Analysis" />
401
+      <window_info anchor="right" id="Palette&#9;" />
402
+      <window_info anchor="right" id="Database" />
403
+      <window_info anchor="right" id="Maven Projects" />
404
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
405
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
406
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
407
+    </layout>
408
+    <layout-to-restore>
409
+      <window_info id="Image Layers" order="0" />
410
+      <window_info id="Designer" order="1" />
411
+      <window_info id="UI Designer" order="2" />
412
+      <window_info id="Capture Tool" order="3" />
413
+      <window_info id="Favorites" order="4" side_tool="true" />
414
+      <window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.24959612" />
415
+      <window_info id="Structure" order="6" side_tool="true" weight="0.25" />
416
+      <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
417
+      <window_info anchor="bottom" id="Terminal" order="1" />
418
+      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
419
+      <window_info anchor="bottom" id="Database Changes" order="3" show_stripe_button="false" />
420
+      <window_info anchor="bottom" id="Messages" order="4" />
421
+      <window_info anchor="bottom" id="Message" order="5" />
422
+      <window_info anchor="bottom" id="Find" order="6" weight="0.32901135" />
423
+      <window_info active="true" anchor="bottom" id="Run" order="7" visible="true" weight="0.32901135" />
424
+      <window_info anchor="bottom" id="Debug" order="8" weight="0.4" />
425
+      <window_info anchor="bottom" id="Cvs" order="9" weight="0.25" />
426
+      <window_info anchor="bottom" id="Inspection" order="10" weight="0.4" />
427
+      <window_info anchor="bottom" id="TODO" order="11" />
428
+      <window_info anchor="right" id="Palette" order="0" />
429
+      <window_info anchor="right" id="Capture Analysis" order="1" />
430
+      <window_info anchor="right" id="Database" order="2" />
431
+      <window_info anchor="right" id="Theme Preview" order="3" />
432
+      <window_info anchor="right" id="Palette&#9;" order="4" />
433
+      <window_info anchor="right" id="Maven Projects" order="5" />
434
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="6" type="SLIDING" weight="0.4" />
435
+      <window_info anchor="right" id="Ant Build" order="7" weight="0.25" />
436
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="8" weight="0.25" />
437
+    </layout-to-restore>
438
+  </component>
439
+  <component name="TypeScriptGeneratedFilesManager">
440
+    <option name="version" value="1" />
441
+  </component>
442
+  <component name="VcsContentAnnotationSettings">
443
+    <option name="myLimit" value="2678400000" />
444
+  </component>
445
+  <component name="XDebuggerManager">
446
+    <breakpoint-manager>
447
+      <breakpoints>
448
+        <line-breakpoint enabled="true" type="java-line">
449
+          <url>file://$PROJECT_DIR$/src/main/java/MySet.java</url>
450
+          <line>76</line>
451
+          <properties />
452
+          <option name="timeStamp" value="2" />
453
+        </line-breakpoint>
454
+      </breakpoints>
455
+    </breakpoint-manager>
456
+  </component>
457
+  <component name="editorHistoryManager">
458
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
459
+      <provider selected="true" editor-type-id="text-editor">
460
+        <state relative-caret-position="276">
461
+          <caret line="34" column="25" lean-forward="true" selection-start-line="34" selection-start-column="25" selection-end-line="34" selection-end-column="25" />
462
+          <folding>
463
+            <element signature="imports" expanded="true" />
464
+            <element signature="e#205#206#0" expanded="true" />
465
+            <element signature="e#249#250#0" expanded="true" />
466
+            <element signature="e#285#286#0" expanded="true" />
467
+            <element signature="e#332#333#0" expanded="true" />
468
+            <element signature="e#1757#1758#0" expanded="true" />
469
+            <element signature="e#1796#1797#0" expanded="true" />
470
+            <element signature="e#2158#2159#0" expanded="true" />
471
+            <element signature="e#2195#2196#0" expanded="true" />
472
+          </folding>
473
+        </state>
474
+      </provider>
475
+    </entry>
476
+    <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
477
+      <provider selected="true" editor-type-id="text-editor">
478
+        <state relative-caret-position="322">
479
+          <caret line="91" column="1" lean-forward="true" selection-end-line="91" selection-end-column="1" />
480
+          <folding>
481
+            <element signature="imports" expanded="true" />
482
+          </folding>
483
+        </state>
484
+      </provider>
485
+    </entry>
486
+    <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
487
+      <provider selected="true" editor-type-id="text-editor">
488
+        <state relative-caret-position="183">
489
+          <caret line="19" selection-start-line="19" selection-end-line="19" />
490
+          <folding>
491
+            <element signature="e#131#132#0" expanded="true" />
492
+            <element signature="e#175#176#0" expanded="true" />
493
+            <element signature="e#211#212#0" expanded="true" />
494
+            <element signature="e#258#259#0" expanded="true" />
495
+            <element signature="e#1625#1626#0" expanded="true" />
496
+            <element signature="e#1718#1719#0" expanded="true" />
497
+            <element signature="e#2068#2069#0" expanded="true" />
498
+            <element signature="e#2106#2107#0" expanded="true" />
499
+          </folding>
500
+        </state>
501
+      </provider>
502
+    </entry>
503
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/model/FrameworkMethod.class">
504
+      <provider selected="true" editor-type-id="text-editor">
505
+        <state relative-caret-position="220">
506
+          <caret line="56" column="9" lean-forward="true" selection-start-line="56" selection-start-column="9" selection-end-line="56" selection-end-column="9" />
507
+        </state>
508
+      </provider>
509
+    </entry>
510
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
511
+      <provider selected="true" editor-type-id="text-editor">
512
+        <state relative-caret-position="1290">
513
+          <caret line="86" selection-start-line="86" selection-end-line="86" />
514
+          <folding>
515
+            <element signature="imports" expanded="true" />
516
+          </folding>
517
+        </state>
518
+      </provider>
519
+    </entry>
520
+  </component>
521
+</project>

+ 16
- 0
generics.iml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_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>

+ 102
- 0
src/main/java/MyArrayList.java View File

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

+ 87
- 0
src/main/java/MySet.java View File

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

+ 92
- 0
src/test/java/MyArrayListTest.java View File

@@ -0,0 +1,92 @@
1
+import org.junit.Assert;
2
+import org.junit.Before;
3
+import org.junit.Test;
4
+
5
+import java.lang.reflect.Array;
6
+import java.util.ArrayList;
7
+
8
+public class MyArrayListTest {
9
+
10
+    MyArrayList<Object> list = new MyArrayList<>();
11
+
12
+    @Test
13
+    public void testAdd(){
14
+        Integer n = 3;
15
+        list.add(n);
16
+        Assert.assertEquals(1, list.size());
17
+    }
18
+
19
+    @Test
20
+    public void testAddString(){
21
+        list = new MyArrayList<>();
22
+        String s = "xyz";
23
+        list.add(s);
24
+        Assert.assertEquals(1, list.size());
25
+    }
26
+
27
+    @Test
28
+    public void testAddAtIndex(){
29
+        list.clear();
30
+        list.add(2);
31
+        list.add("element");
32
+        double d = 3.23;
33
+        list.add(1, d);
34
+        Assert.assertEquals(3, list.size());
35
+    }
36
+
37
+    @Test
38
+    public void testGet(){
39
+        list.add(2);
40
+        Object actual = list.get(0);
41
+        Assert.assertEquals(2, actual);
42
+    }
43
+
44
+    @Test
45
+    public void testRemove(){
46
+        Integer element = 2;
47
+        list.add(element);
48
+        Assert.assertEquals(true, list.remove(element));
49
+    }
50
+
51
+    @Test
52
+    public void testRemove2(){
53
+        Integer element = 2;
54
+        Assert.assertEquals(false, list.remove(element));
55
+    }
56
+
57
+   @Test
58
+    public void testSet(){
59
+        Integer element = 3;
60
+        list.add(element);
61
+        Assert.assertEquals(element,list.set(0, element));
62
+    }
63
+
64
+    @Test
65
+    public void testClear(){
66
+        list.clear();
67
+        Assert.assertEquals(0, list.size());
68
+    }
69
+
70
+    @Test
71
+    public void testIsEmpty(){
72
+        list.clear();
73
+        Assert.assertEquals(true, list.isEmpty());
74
+    }
75
+
76
+    @Test
77
+    public void testContains(){
78
+        Integer n = 5;
79
+        list.add(n);
80
+        Assert.assertEquals(true, list.contains(n));
81
+    }
82
+
83
+    @Test
84
+    public void testSize(){
85
+        list.clear();
86
+        Integer n = 5;
87
+        list.add(n);
88
+        n = 6;
89
+        list.add(n);
90
+        Assert.assertEquals(2, list.size());
91
+    }
92
+}

+ 89
- 0
src/test/java/MySetTest.java View File

@@ -0,0 +1,89 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+public class MySetTest {
5
+
6
+        MySet<Object> set = new MySet<>();
7
+
8
+        @Test
9
+        public void testAdd(){
10
+            Integer n = 3;
11
+            set.add(n);
12
+            Assert.assertEquals(1, set.size());
13
+        }
14
+
15
+        @Test
16
+        public void testAdd2(){
17
+            Integer n = 3;
18
+            set.add(n);
19
+            Assert.assertEquals(1, set.size());
20
+        }
21
+
22
+        @Test
23
+        public void testAddString(){
24
+            set = new MySet<>();
25
+            String s = "xyz";
26
+            set.add(s);
27
+            Assert.assertEquals(1, set.size());
28
+        }
29
+
30
+        @Test
31
+        public void testAddAtIndex(){
32
+            set.clear();
33
+            set.add(2);
34
+            set.add("element");
35
+            double d = 3.23;
36
+            set.add(1, d);
37
+            Assert.assertEquals(3, set.size());
38
+        }
39
+
40
+        @Test
41
+        public void testGet(){
42
+            set.add(2);
43
+            Object actual = set.get(0);
44
+            Assert.assertEquals(2, actual);
45
+        }
46
+
47
+        @Test
48
+        public void testRemove(){
49
+            Integer element = 2;
50
+            set.add(element);
51
+            Assert.assertEquals(true, set.remove(element));
52
+        }
53
+
54
+        @Test
55
+        public void testRemove2(){
56
+            Integer element = 2;
57
+            Assert.assertEquals(false, set.remove(element));
58
+        }
59
+
60
+        @Test
61
+        public void testClear(){
62
+            set.clear();
63
+            Assert.assertEquals(0, set.size());
64
+        }
65
+
66
+        @Test
67
+        public void testIsEmpty(){
68
+            set.clear();
69
+            Assert.assertEquals(true, set.isEmpty());
70
+        }
71
+
72
+        @Test
73
+        public void testContains(){
74
+            Integer n = 5;
75
+            set.add(n);
76
+            Assert.assertEquals(true, set.contains(n));
77
+        }
78
+
79
+        @Test
80
+        public void testSize(){
81
+            set.clear();
82
+            Integer n = 13;
83
+            set.add(n);
84
+            n = 6;
85
+            set.add(n);
86
+            Assert.assertEquals(2, set.size());
87
+        }
88
+
89
+}