Pārlūkot izejas kodu

forgot one method

Connor Dunnigan 6 gadus atpakaļ
vecāks
revīzija
10eaea8f45

+ 101
- 107
.idea/workspace.xml Parādīt failu

@@ -2,7 +2,9 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="4f0c6f35-1ac5-49ea-b41e-20445c07c5c6" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java" afterDir="false" />
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java" afterDir="false" />
6 8
     </list>
7 9
     <ignored path="$PROJECT_DIR$/out/" />
8 10
     <ignored path="$PROJECT_DIR$/target/" />
@@ -16,32 +18,38 @@
16 18
     <session id="-863643514">
17 19
       <usages-collector id="statistics.lifecycle.project">
18 20
         <counts>
21
+          <entry key="project.closed" value="4" />
22
+          <entry key="project.open.time.2" value="2" />
23
+          <entry key="project.open.time.4" value="1" />
24
+          <entry key="project.open.time.5" value="1" />
19 25
           <entry key="project.open.time.8" value="1" />
20
-          <entry key="project.opened" value="1" />
26
+          <entry key="project.opened" value="5" />
21 27
         </counts>
22 28
       </usages-collector>
23 29
       <usages-collector id="statistics.file.extensions.edit">
24 30
         <counts>
25
-          <entry key="java" value="6107" />
31
+          <entry key="java" value="6494" />
26 32
           <entry key="xml" value="10" />
27 33
         </counts>
28 34
       </usages-collector>
29 35
       <usages-collector id="statistics.file.types.edit">
30 36
         <counts>
31
-          <entry key="JAVA" value="6107" />
37
+          <entry key="JAVA" value="6494" />
32 38
           <entry key="XML" value="10" />
33 39
         </counts>
34 40
       </usages-collector>
35 41
       <usages-collector id="statistics.file.extensions.open">
36 42
         <counts>
37 43
           <entry key="class" value="1" />
38
-          <entry key="java" value="7" />
44
+          <entry key="java" value="8" />
45
+          <entry key="xml" value="1" />
39 46
         </counts>
40 47
       </usages-collector>
41 48
       <usages-collector id="statistics.file.types.open">
42 49
         <counts>
43 50
           <entry key="CLASS" value="1" />
44
-          <entry key="JAVA" value="7" />
51
+          <entry key="JAVA" value="8" />
52
+          <entry key="XML" value="1" />
45 53
         </counts>
46 54
       </usages-collector>
47 55
     </session>
@@ -60,51 +68,45 @@
60 68
               </provider>
61 69
             </entry>
62 70
           </file>
63
-          <file pinned="false" current-in-tab="false">
71
+          <file pinned="false" current-in-tab="true">
64 72
             <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java">
65 73
               <provider selected="true" editor-type-id="text-editor">
66
-                <state relative-caret-position="165">
67
-                  <caret line="11" column="21" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="21" />
68
-                  <folding>
69
-                    <element signature="e#301#302#0" expanded="true" />
70
-                    <element signature="e#328#329#0" expanded="true" />
71
-                    <element signature="e#366#367#0" expanded="true" />
72
-                    <element signature="e#398#399#0" expanded="true" />
73
-                  </folding>
74
+                <state relative-caret-position="840">
75
+                  <caret line="60" column="41" lean-forward="true" selection-start-line="60" selection-start-column="41" selection-end-line="60" selection-end-column="41" />
74 76
                 </state>
75 77
               </provider>
76 78
             </entry>
77 79
           </file>
80
+        </leaf>
81
+      </split-first>
82
+      <split-second>
83
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
78 84
           <file pinned="false" current-in-tab="false">
79
-            <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/LinkedList.java">
85
+            <entry file="file://$PROJECT_DIR$/pom.xml">
80 86
               <provider selected="true" editor-type-id="text-editor">
81
-                <state relative-caret-position="-4732">
82
-                  <caret line="82" column="13" selection-start-line="82" selection-start-column="13" selection-end-line="82" selection-end-column="13" />
87
+                <state relative-caret-position="270">
88
+                  <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
83 89
                 </state>
84 90
               </provider>
85 91
             </entry>
86 92
           </file>
87
-          <file pinned="false" current-in-tab="true">
88
-            <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java">
93
+          <file pinned="false" current-in-tab="false">
94
+            <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java">
89 95
               <provider selected="true" editor-type-id="text-editor">
90
-                <state relative-caret-position="-99">
91
-                  <caret line="135" lean-forward="true" selection-start-line="135" selection-end-line="135" />
92
-                  <folding>
93
-                    <element signature="imports" expanded="true" />
94
-                  </folding>
96
+                <state relative-caret-position="300">
97
+                  <caret line="20" column="75" selection-start-line="20" selection-start-column="75" selection-end-line="20" selection-end-column="75" />
95 98
                 </state>
96 99
               </provider>
97 100
             </entry>
98 101
           </file>
99
-        </leaf>
100
-      </split-first>
101
-      <split-second>
102
-        <leaf>
103 102
           <file pinned="false" current-in-tab="true">
104
-            <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java">
103
+            <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java">
105 104
               <provider selected="true" editor-type-id="text-editor">
106
-                <state relative-caret-position="300">
107
-                  <caret line="20" column="75" selection-start-line="20" selection-start-column="75" selection-end-line="20" selection-end-column="75" />
105
+                <state relative-caret-position="193">
106
+                  <caret line="74" column="23" selection-start-line="74" selection-start-column="23" selection-end-line="74" selection-end-column="23" />
107
+                  <folding>
108
+                    <element signature="imports" expanded="true" />
109
+                  </folding>
108 110
                 </state>
109 111
               </provider>
110 112
             </entry>
@@ -129,9 +131,9 @@
129 131
         <option value="$PROJECT_DIR$/.gitignore" />
130 132
         <option value="$PROJECT_DIR$/pom.xml" />
131 133
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/Node.java" />
132
-        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java" />
133
-        <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java" />
134 134
         <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java" />
135
+        <option value="$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java" />
136
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java" />
135 137
       </list>
136 138
     </option>
137 139
   </component>
@@ -149,10 +151,10 @@
149 151
     </option>
150 152
   </component>
151 153
   <component name="ProjectFrameBounds">
152
-    <option name="x" value="-349" />
153
-    <option name="y" value="-1057" />
154
-    <option name="width" value="1867" />
155
-    <option name="height" value="1033" />
154
+    <option name="x" value="-345" />
155
+    <option name="y" value="-1038" />
156
+    <option name="width" value="1670" />
157
+    <option name="height" value="1038" />
156 158
   </component>
157 159
   <component name="ProjectView">
158 160
     <navigator proportions="" version="1">
@@ -224,7 +226,7 @@
224 226
   <component name="PropertiesComponent">
225 227
     <property name="WebServerToolWindowFactoryState" value="false" />
226 228
     <property name="aspect.path.notification.shown" value="true" />
227
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541190490124" />
229
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1541466176208" />
228 230
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
229 231
     <property name="project.structure.last.edited" value="Project" />
230 232
     <property name="project.structure.proportion" value="0.0" />
@@ -243,7 +245,7 @@
243 245
       </list>
244 246
     </option>
245 247
   </component>
246
-  <component name="RunManager" selected="Application.MainApplication">
248
+  <component name="RunManager" selected="JUnit.SinglyLinkedListTest.removeNode">
247 249
     <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
248 250
       <module name="" />
249 251
       <option name="TESTING_TYPE" value="0" />
@@ -325,7 +327,7 @@
325 327
         <option name="Make" enabled="true" />
326 328
       </method>
327 329
     </configuration>
328
-    <configuration name="SinglyLinkedListTest.testCopy" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
330
+    <configuration name="SinglyLinkedListTest.removeNode" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
329 331
       <module name="singlylinkedlist" />
330 332
       <extension name="coverage">
331 333
         <pattern>
@@ -335,14 +337,14 @@
335 337
       </extension>
336 338
       <option name="PACKAGE_NAME" value="com.zipcodewilmington.singlylinkedlist" />
337 339
       <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.singlylinkedlist.SinglyLinkedListTest" />
338
-      <option name="METHOD_NAME" value="testCopy" />
340
+      <option name="METHOD_NAME" value="removeNode" />
339 341
       <option name="TEST_OBJECT" value="method" />
340 342
       <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
341 343
       <method v="2">
342 344
         <option name="Make" enabled="true" />
343 345
       </method>
344 346
     </configuration>
345
-    <configuration name="SinglyLinkedListTest.testCopy2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
347
+    <configuration name="SinglyLinkedListTest.testCopy" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
346 348
       <module name="singlylinkedlist" />
347 349
       <extension name="coverage">
348 350
         <pattern>
@@ -352,7 +354,7 @@
352 354
       </extension>
353 355
       <option name="PACKAGE_NAME" value="com.zipcodewilmington.singlylinkedlist" />
354 356
       <option name="MAIN_CLASS_NAME" value="com.zipcodewilmington.singlylinkedlist.SinglyLinkedListTest" />
355
-      <option name="METHOD_NAME" value="testCopy2" />
357
+      <option name="METHOD_NAME" value="testCopy" />
356 358
       <option name="TEST_OBJECT" value="method" />
357 359
       <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
358 360
       <method v="2">
@@ -415,17 +417,17 @@
415 417
     <list>
416 418
       <item itemvalue="JUnit.SinglyLinkedListTest.testCopy" />
417 419
       <item itemvalue="JUnit.SinglyLinkedListTest" />
418
-      <item itemvalue="JUnit.SinglyLinkedListTest.testCopy2" />
419 420
       <item itemvalue="JUnit.SinglyLinkedListTest.testSort" />
420 421
       <item itemvalue="Application.MainApplication" />
422
+      <item itemvalue="JUnit.SinglyLinkedListTest.removeNode" />
421 423
     </list>
422 424
     <recent_temporary>
423 425
       <list>
426
+        <item itemvalue="JUnit.SinglyLinkedListTest.removeNode" />
424 427
         <item itemvalue="Application.MainApplication" />
425 428
         <item itemvalue="JUnit.SinglyLinkedListTest" />
426 429
         <item itemvalue="JUnit.SinglyLinkedListTest.testSort" />
427 430
         <item itemvalue="JUnit.SinglyLinkedListTest.testCopy" />
428
-        <item itemvalue="JUnit.SinglyLinkedListTest.testCopy2" />
429 431
       </list>
430 432
     </recent_temporary>
431 433
   </component>
@@ -439,50 +441,54 @@
439 441
       <option name="number" value="Default" />
440 442
       <option name="presentableId" value="Default" />
441 443
       <updated>1515621994762</updated>
442
-      <workItem from="1540932067056" duration="43800000" />
444
+      <workItem from="1540932067056" duration="44351000" />
445
+      <workItem from="1541201803762" duration="1143000" />
446
+      <workItem from="1541266125521" duration="2831000" />
447
+      <workItem from="1541369767229" duration="1189000" />
448
+      <workItem from="1541389896503" duration="2221000" />
443 449
     </task>
444 450
     <servers />
445 451
   </component>
446 452
   <component name="TestHistory">
447
-    <history-entry file="SinglyLinkedListTest_testSort - 2018.11.02 at 15h 56m 37s.xml">
448
-      <configuration name="SinglyLinkedListTest.testSort" configurationId="JUnit" />
453
+    <history-entry file="SinglyLinkedListTest - 2018.11.02 at 16h 12m 08s.xml">
454
+      <configuration name="SinglyLinkedListTest" configurationId="JUnit" />
449 455
     </history-entry>
450
-    <history-entry file="SinglyLinkedListTest_testSort - 2018.11.02 at 15h 58m 52s.xml">
451
-      <configuration name="SinglyLinkedListTest.testSort" configurationId="JUnit" />
456
+    <history-entry file="SinglyLinkedListTest - 2018.11.02 at 16h 18m 51s.xml">
457
+      <configuration name="SinglyLinkedListTest" configurationId="JUnit" />
452 458
     </history-entry>
453
-    <history-entry file="SinglyLinkedListTest_testSort - 2018.11.02 at 16h 00m 09s.xml">
454
-      <configuration name="SinglyLinkedListTest.testSort" configurationId="JUnit" />
459
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 19h 51m 03s.xml">
460
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
455 461
     </history-entry>
456
-    <history-entry file="SinglyLinkedListTest_testCopy - 2018.11.02 at 16h 00m 11s.xml">
457
-      <configuration name="SinglyLinkedListTest.testCopy" configurationId="JUnit" />
462
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 19h 55m 21s.xml">
463
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
458 464
     </history-entry>
459
-    <history-entry file="SinglyLinkedListTest_testCopy - 2018.11.02 at 16h 00m 12s.xml">
460
-      <configuration name="SinglyLinkedListTest.testCopy" configurationId="JUnit" />
465
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 19h 55m 40s.xml">
466
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
461 467
     </history-entry>
462
-    <history-entry file="SinglyLinkedListTest_testSort - 2018.11.02 at 16h 00m 12s.xml">
463
-      <configuration name="SinglyLinkedListTest.testSort" configurationId="JUnit" />
468
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 20h 01m 22s.xml">
469
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
464 470
     </history-entry>
465
-    <history-entry file="SinglyLinkedListTest_testSort - 2018.11.02 at 16h 00m 21s.xml">
466
-      <configuration name="SinglyLinkedListTest.testSort" configurationId="JUnit" />
471
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 20h 01m 58s.xml">
472
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
467 473
     </history-entry>
468
-    <history-entry file="SinglyLinkedListTest - 2018.11.02 at 16h 11m 28s.xml">
469
-      <configuration name="SinglyLinkedListTest" configurationId="JUnit" />
474
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 20h 02m 09s.xml">
475
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
470 476
     </history-entry>
471
-    <history-entry file="SinglyLinkedListTest - 2018.11.02 at 16h 12m 08s.xml">
472
-      <configuration name="SinglyLinkedListTest" configurationId="JUnit" />
477
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 20h 02m 33s.xml">
478
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
473 479
     </history-entry>
474
-    <history-entry file="SinglyLinkedListTest - 2018.11.02 at 16h 18m 51s.xml">
475
-      <configuration name="SinglyLinkedListTest" configurationId="JUnit" />
480
+    <history-entry file="SinglyLinkedListTest_removeNode - 2018.11.05 at 20h 03m 01s.xml">
481
+      <configuration name="SinglyLinkedListTest.removeNode" configurationId="JUnit" />
476 482
     </history-entry>
477 483
   </component>
478 484
   <component name="TimeTrackingManager">
479
-    <option name="totallyTimeSpent" value="43800000" />
485
+    <option name="totallyTimeSpent" value="51735000" />
480 486
   </component>
481 487
   <component name="ToolWindowManager">
482
-    <frame x="-349" y="-1057" width="1867" height="1033" extended-state="0" />
488
+    <frame x="-345" y="-1038" width="1670" height="1038" extended-state="0" />
483 489
     <editor active="true" />
484 490
     <layout>
485
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.10575342" />
491
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.12162162" />
486 492
       <window_info id="Structure" order="1" weight="0.25" />
487 493
       <window_info id="Nl-Palette" order="2" />
488 494
       <window_info id="Favorites" order="3" side_tool="true" />
@@ -490,11 +496,9 @@
490 496
       <window_info id="Designer" order="5" />
491 497
       <window_info id="UI Designer" order="6" />
492 498
       <window_info id="Capture Tool" order="7" />
493
-      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
494
-      <window_info anchor="bottom" id="Messages" weight="0.21679065" />
495 499
       <window_info anchor="bottom" id="Message" order="0" />
496 500
       <window_info anchor="bottom" id="Find" order="1" weight="0.32998884" />
497
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32731137" />
501
+      <window_info anchor="bottom" id="Run" order="2" weight="0.3266385" />
498 502
       <window_info anchor="bottom" id="Debug" order="3" weight="0.5791711" />
499 503
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
500 504
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -502,7 +506,8 @@
502 506
       <window_info anchor="bottom" id="Terminal" order="7" weight="0.32901135" />
503 507
       <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
504 508
       <window_info anchor="bottom" id="Version Control" order="9" />
505
-      <window_info anchor="right" id="Database" />
509
+      <window_info anchor="bottom" id="Messages" order="10" weight="0.21670191" />
510
+      <window_info anchor="bottom" id="Database Changes" order="11" show_stripe_button="false" />
506 511
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
507 512
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
508 513
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -512,6 +517,7 @@
512 517
       <window_info anchor="right" id="Properties" order="6" />
513 518
       <window_info anchor="right" id="Palette&#9;" order="7" />
514 519
       <window_info anchor="right" id="Maven Projects" order="8" />
520
+      <window_info anchor="right" id="Database" order="9" />
515 521
     </layout>
516 522
   </component>
517 523
   <component name="TypeScriptGeneratedFilesManager">
@@ -529,10 +535,18 @@
529 535
         </state>
530 536
       </provider>
531 537
     </entry>
532
-    <entry file="file://$PROJECT_DIR$/pom.xml">
538
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/Node.java" />
539
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
533 540
       <provider selected="true" editor-type-id="text-editor">
534
-        <state relative-caret-position="270">
535
-          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
541
+        <state relative-caret-position="195">
542
+          <caret line="13" column="42" selection-start-line="13" selection-start-column="42" selection-end-line="13" selection-end-column="42" />
543
+        </state>
544
+      </provider>
545
+    </entry>
546
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/LinkedList.java">
547
+      <provider selected="true" editor-type-id="text-editor">
548
+        <state relative-caret-position="-5225">
549
+          <caret line="82" column="13" selection-start-line="82" selection-start-column="13" selection-end-line="82" selection-end-column="13" />
536 550
         </state>
537 551
       </provider>
538 552
     </entry>
@@ -544,56 +558,36 @@
544 558
         </state>
545 559
       </provider>
546 560
     </entry>
547
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/Node.java">
548
-      <provider selected="true" editor-type-id="text-editor">
549
-        <state relative-caret-position="30">
550
-          <caret line="2" lean-forward="true" selection-start-line="2" selection-start-column="2" selection-end-line="6" selection-end-column="3" />
551
-        </state>
552
-      </provider>
553
-    </entry>
554
-    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/LinkedList.java">
561
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java">
555 562
       <provider selected="true" editor-type-id="text-editor">
556
-        <state relative-caret-position="-4732">
557
-          <caret line="82" column="13" selection-start-line="82" selection-start-column="13" selection-end-line="82" selection-end-column="13" />
563
+        <state relative-caret-position="300">
564
+          <caret line="20" column="75" selection-start-line="20" selection-start-column="75" selection-end-line="20" selection-end-column="75" />
558 565
         </state>
559 566
       </provider>
560 567
     </entry>
561
-    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
568
+    <entry file="file://$PROJECT_DIR$/pom.xml">
562 569
       <provider selected="true" editor-type-id="text-editor">
563
-        <state relative-caret-position="195">
564
-          <caret line="13" column="42" selection-start-line="13" selection-start-column="42" selection-end-line="13" selection-end-column="42" />
570
+        <state relative-caret-position="270">
571
+          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
565 572
         </state>
566 573
       </provider>
567 574
     </entry>
568 575
     <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java">
569 576
       <provider selected="true" editor-type-id="text-editor">
570
-        <state relative-caret-position="165">
571
-          <caret line="11" column="21" selection-start-line="11" selection-start-column="21" selection-end-line="11" selection-end-column="21" />
572
-          <folding>
573
-            <element signature="e#301#302#0" expanded="true" />
574
-            <element signature="e#328#329#0" expanded="true" />
575
-            <element signature="e#366#367#0" expanded="true" />
576
-            <element signature="e#398#399#0" expanded="true" />
577
-          </folding>
577
+        <state relative-caret-position="840">
578
+          <caret line="60" column="41" lean-forward="true" selection-start-line="60" selection-start-column="41" selection-end-line="60" selection-end-column="41" />
578 579
         </state>
579 580
       </provider>
580 581
     </entry>
581 582
     <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java">
582 583
       <provider selected="true" editor-type-id="text-editor">
583
-        <state relative-caret-position="-99">
584
-          <caret line="135" lean-forward="true" selection-start-line="135" selection-end-line="135" />
584
+        <state relative-caret-position="193">
585
+          <caret line="74" column="23" selection-start-line="74" selection-start-column="23" selection-end-line="74" selection-end-column="23" />
585 586
           <folding>
586 587
             <element signature="imports" expanded="true" />
587 588
           </folding>
588 589
         </state>
589 590
       </provider>
590 591
     </entry>
591
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcodewilmington/singlylinkedlist/MainApplication.java">
592
-      <provider selected="true" editor-type-id="text-editor">
593
-        <state relative-caret-position="300">
594
-          <caret line="20" column="75" selection-start-line="20" selection-start-column="75" selection-end-line="20" selection-end-column="75" />
595
-        </state>
596
-      </provider>
597
-    </entry>
598 592
   </component>
599 593
 </project>

+ 15
- 2
src/main/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedList.java Parādīt failu

@@ -48,6 +48,20 @@ public class SinglyLinkedList {
48 48
         }
49 49
     }
50 50
 
51
+    public void remove(Integer index){
52
+        current = head;
53
+        if(index == 0){
54
+            setHead(head.next);
55
+        }
56
+        int count = 0;
57
+        while (current != null && count < index -1) {
58
+            count++;
59
+            current = current.next;
60
+        }
61
+        current.next = current.next.next;
62
+
63
+    }
64
+
51 65
     public boolean contains(Integer inData) {
52 66
         current = head;
53 67
         while (current != null) {
@@ -98,11 +112,10 @@ public class SinglyLinkedList {
98 112
 
99 113
     public SinglyLinkedList getCopy() {
100 114
         current = head;
101
-        Integer size = this.getSize();
102 115
         SinglyLinkedList newList = new SinglyLinkedList();
103 116
         newList.setHead(this.head);
104 117
         newList.current = newList.head;
105
-        while (newList.getSize() < size) {
118
+        while (newList.getSize() < this.getSize()) {
106 119
             newList.appendNode(current.data);
107 120
         }
108 121
         return newList;

+ 19
- 0
src/test/java/com/zipcodewilmington/singlylinkedlist/SinglyLinkedListTest.java Parādīt failu

@@ -62,6 +62,25 @@ public class SinglyLinkedListTest {
62 62
     }
63 63
 
64 64
     @Test
65
+    public void removeNode(){
66
+        //Given
67
+        SinglyLinkedList myList = new SinglyLinkedList();
68
+        SinglyLinkedList.Node node1 = new SinglyLinkedList.Node(0,null);
69
+
70
+        //When
71
+        myList.setHead(node1);
72
+        myList.appendNode(1);
73
+        myList.prependNode(2);
74
+        myList.appendNode(3);
75
+        myList.remove(2);
76
+        Integer expSize = 3;
77
+        Integer actSize = myList.getSize();
78
+
79
+        //Then
80
+        Assert.assertEquals(expSize,actSize);
81
+    }
82
+
83
+    @Test
65 84
     public void testContains(){
66 85
         //Given
67 86
         SinglyLinkedList myList = new SinglyLinkedList();