ソースを参照

All methods working

William Brown 6 年 前
コミット
5abc1f5e51
共有3 個のファイルを変更した73 個の追加64 個の削除を含む
  1. 51
    61
      .idea/workspace.xml
  2. 11
    2
      arraz/src/main/java/Arraz.java
  3. 11
    1
      arraz/src/test/java/ArrazTest.java

+ 51
- 61
.idea/workspace.xml ファイルの表示

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
7
-      <change beforePath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_0.xml" beforeDir="false" />
8
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
-      <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/arraz/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/pom.xml" afterDir="false" />
11
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
12
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
6
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
13
     </list>
7
     </list>
21
   <component name="CoverageDataManager">
15
   <component name="CoverageDataManager">
22
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testCheck2ArraysForEqual3.ic" NAME="ArrazTest.testCheck2ArraysForEqual3 Coverage Results" MODIFIED="1544144487539" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
16
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testCheck2ArraysForEqual3.ic" NAME="ArrazTest.testCheck2ArraysForEqual3 Coverage Results" MODIFIED="1544144487539" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
23
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testRemoveElementFromArray3.ic" NAME="ArrazTest.testRemoveElementFromArray3 Coverage Results" MODIFIED="1544144601050" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
17
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testRemoveElementFromArray3.ic" NAME="ArrazTest.testRemoveElementFromArray3 Coverage Results" MODIFIED="1544144601050" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
24
-    <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest.ic" NAME="ArrazTest Coverage Results" MODIFIED="1544144398898" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
25
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testFindIndexOf2.ic" NAME="ArrazTest.testFindIndexOf2 Coverage Results" MODIFIED="1544144634293" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
18
     <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest_testFindIndexOf2.ic" NAME="ArrazTest.testFindIndexOf2 Coverage Results" MODIFIED="1544144634293" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
19
+    <SUITE FILE_PATH="coverage/ArraysGoneWild$ArrazTest.ic" NAME="ArrazTest Coverage Results" MODIFIED="1544145500960" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
26
   </component>
20
   </component>
27
   <component name="CoverageViewManager">
21
   <component name="CoverageViewManager">
28
-    <option name="myElementSize" value="154" />
22
+    <option name="myElementSize" value="153" />
29
   </component>
23
   </component>
30
   <component name="FUSProjectUsageTrigger">
24
   <component name="FUSProjectUsageTrigger">
31
     <session id="-1803996711">
25
     <session id="-1803996711">
32
       <usages-collector id="statistics.lifecycle.project">
26
       <usages-collector id="statistics.lifecycle.project">
33
         <counts>
27
         <counts>
34
-          <entry key="project.closed" value="4" />
28
+          <entry key="project.closed" value="5" />
35
           <entry key="project.open.time.14" value="2" />
29
           <entry key="project.open.time.14" value="2" />
36
           <entry key="project.open.time.2" value="1" />
30
           <entry key="project.open.time.2" value="1" />
37
           <entry key="project.open.time.4" value="2" />
31
           <entry key="project.open.time.4" value="2" />
40
       </usages-collector>
34
       </usages-collector>
41
       <usages-collector id="statistics.file.types.edit">
35
       <usages-collector id="statistics.file.types.edit">
42
         <counts>
36
         <counts>
43
-          <entry key="JAVA" value="9727" />
37
+          <entry key="JAVA" value="9947" />
44
           <entry key="XML" value="4" />
38
           <entry key="XML" value="4" />
45
         </counts>
39
         </counts>
46
       </usages-collector>
40
       </usages-collector>
54
   </component>
48
   </component>
55
   <component name="FileEditorManager">
49
   <component name="FileEditorManager">
56
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
50
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
57
-      <file pinned="false" current-in-tab="false">
51
+      <file pinned="false" current-in-tab="true">
58
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
52
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
59
           <provider selected="true" editor-type-id="text-editor">
53
           <provider selected="true" editor-type-id="text-editor">
60
-            <state relative-caret-position="280">
61
-              <caret line="81" column="20" selection-start-line="81" selection-start-column="20" selection-end-line="81" selection-end-column="20" />
54
+            <state relative-caret-position="1335">
55
+              <caret line="89" column="9" lean-forward="true" selection-start-line="89" selection-start-column="9" selection-end-line="89" selection-end-column="9" />
62
               <folding>
56
               <folding>
63
                 <element signature="imports" expanded="true" />
57
                 <element signature="imports" expanded="true" />
64
                 <element signature="e#504#505#0" expanded="true" />
58
                 <element signature="e#504#505#0" expanded="true" />
65
                 <element signature="e#561#562#0" expanded="true" />
59
                 <element signature="e#561#562#0" expanded="true" />
66
                 <element signature="e#616#617#0" expanded="true" />
60
                 <element signature="e#616#617#0" expanded="true" />
67
                 <element signature="e#674#675#0" expanded="true" />
61
                 <element signature="e#674#675#0" expanded="true" />
68
-                <element signature="e#1783#1784#0" expanded="true" />
69
-                <element signature="e#1810#1811#0" expanded="true" />
70
                 <element signature="e#4880#4881#0" expanded="true" />
62
                 <element signature="e#4880#4881#0" expanded="true" />
71
                 <element signature="e#4918#4919#0" expanded="true" />
63
                 <element signature="e#4918#4919#0" expanded="true" />
72
               </folding>
64
               </folding>
74
           </provider>
66
           </provider>
75
         </entry>
67
         </entry>
76
       </file>
68
       </file>
77
-      <file pinned="false" current-in-tab="true">
69
+      <file pinned="false" current-in-tab="false">
78
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
70
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
79
           <provider selected="true" editor-type-id="text-editor">
71
           <provider selected="true" editor-type-id="text-editor">
80
-            <state relative-caret-position="386">
81
-              <caret line="203" lean-forward="true" selection-start-line="203" selection-end-line="203" />
72
+            <state relative-caret-position="3090">
73
+              <caret line="206" column="37" lean-forward="true" selection-start-line="206" selection-start-column="37" selection-end-line="206" selection-end-column="37" />
82
               <folding>
74
               <folding>
83
                 <element signature="imports" expanded="true" />
75
                 <element signature="imports" expanded="true" />
84
                 <element signature="e#8537#8546#0" expanded="true" />
76
                 <element signature="e#8537#8546#0" expanded="true" />
220
     <property name="GO_FMT" value="false" />
212
     <property name="GO_FMT" value="false" />
221
     <property name="WebServerToolWindowFactoryState" value="false" />
213
     <property name="WebServerToolWindowFactoryState" value="false" />
222
     <property name="aspect.path.notification.shown" value="true" />
214
     <property name="aspect.path.notification.shown" value="true" />
223
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544144681387" />
215
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544145500059" />
224
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
216
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
225
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
217
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
226
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
218
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
247
       </list>
239
       </list>
248
     </option>
240
     </option>
249
   </component>
241
   </component>
250
-  <component name="RunManager" selected="JUnit.ArrazTest.testFindIndexOf2">
242
+  <component name="RunManager" selected="JUnit.ArrazTest">
251
     <configuration default="true" type="Applet" factoryName="Applet">
243
     <configuration default="true" type="Applet" factoryName="Applet">
252
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
244
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
253
       <method v="2">
245
       <method v="2">
269
         <option name="Make" enabled="true" />
261
         <option name="Make" enabled="true" />
270
       </method>
262
       </method>
271
     </configuration>
263
     </configuration>
272
-    <configuration name="ArrazTest.testCheck2ArraysForEqual3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
264
+    <configuration name="ArrazTest.testCopyArrayByInterator1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
273
       <module name="arraz" />
265
       <module name="arraz" />
274
       <option name="PACKAGE_NAME" value="" />
266
       <option name="PACKAGE_NAME" value="" />
275
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
267
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
276
-      <option name="METHOD_NAME" value="testCheck2ArraysForEqual3" />
268
+      <option name="METHOD_NAME" value="testCopyArrayByInterator1" />
277
       <option name="TEST_OBJECT" value="method" />
269
       <option name="TEST_OBJECT" value="method" />
278
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
270
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
279
       <method v="2">
271
       <method v="2">
280
         <option name="Make" enabled="true" />
272
         <option name="Make" enabled="true" />
281
       </method>
273
       </method>
282
     </configuration>
274
     </configuration>
283
-    <configuration name="ArrazTest.testFindIndexOf2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
275
+    <configuration name="ArrazTest.testCopyArrayByInterator2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
284
       <module name="arraz" />
276
       <module name="arraz" />
285
       <option name="PACKAGE_NAME" value="" />
277
       <option name="PACKAGE_NAME" value="" />
286
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
278
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
287
-      <option name="METHOD_NAME" value="testFindIndexOf2" />
279
+      <option name="METHOD_NAME" value="testCopyArrayByInterator2" />
288
       <option name="TEST_OBJECT" value="method" />
280
       <option name="TEST_OBJECT" value="method" />
289
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
281
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
290
       <method v="2">
282
       <method v="2">
291
         <option name="Make" enabled="true" />
283
         <option name="Make" enabled="true" />
292
       </method>
284
       </method>
293
     </configuration>
285
     </configuration>
294
-    <configuration name="ArrazTest.testRemoveElementFromArray3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
+    <configuration name="ArrazTest.testFindIndexOf2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
295
       <module name="arraz" />
287
       <module name="arraz" />
296
       <option name="PACKAGE_NAME" value="" />
288
       <option name="PACKAGE_NAME" value="" />
297
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
289
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
298
-      <option name="METHOD_NAME" value="testRemoveElementFromArray3" />
290
+      <option name="METHOD_NAME" value="testFindIndexOf2" />
299
       <option name="TEST_OBJECT" value="method" />
291
       <option name="TEST_OBJECT" value="method" />
300
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
292
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
301
       <method v="2">
293
       <method v="2">
302
         <option name="Make" enabled="true" />
294
         <option name="Make" enabled="true" />
303
       </method>
295
       </method>
304
     </configuration>
296
     </configuration>
305
-    <configuration name="ArrazTest.testSumValuesOfArrayPostive" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
297
+    <configuration name="ArrazTest.testRemoveElementFromArray3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
306
       <module name="arraz" />
298
       <module name="arraz" />
307
       <option name="PACKAGE_NAME" value="" />
299
       <option name="PACKAGE_NAME" value="" />
308
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
300
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
309
-      <option name="METHOD_NAME" value="testSumValuesOfArrayPostive" />
301
+      <option name="METHOD_NAME" value="testRemoveElementFromArray3" />
310
       <option name="TEST_OBJECT" value="method" />
302
       <option name="TEST_OBJECT" value="method" />
311
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
303
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
312
       <method v="2">
304
       <method v="2">
337
       </method>
329
       </method>
338
     </configuration>
330
     </configuration>
339
     <list>
331
     <list>
340
-      <item itemvalue="JUnit.ArrazTest" />
341
-      <item itemvalue="JUnit.ArrazTest.testSumValuesOfArrayPostive" />
342
-      <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual3" />
343
       <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray3" />
332
       <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray3" />
344
       <item itemvalue="JUnit.ArrazTest.testFindIndexOf2" />
333
       <item itemvalue="JUnit.ArrazTest.testFindIndexOf2" />
334
+      <item itemvalue="JUnit.ArrazTest.testCopyArrayByInterator1" />
335
+      <item itemvalue="JUnit.ArrazTest.testCopyArrayByInterator2" />
336
+      <item itemvalue="JUnit.ArrazTest" />
345
     </list>
337
     </list>
346
     <recent_temporary>
338
     <recent_temporary>
347
       <list>
339
       <list>
340
+        <item itemvalue="JUnit.ArrazTest" />
341
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByInterator2" />
342
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByInterator1" />
348
         <item itemvalue="JUnit.ArrazTest.testFindIndexOf2" />
343
         <item itemvalue="JUnit.ArrazTest.testFindIndexOf2" />
349
         <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray3" />
344
         <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray3" />
350
-        <item itemvalue="JUnit.ArrazTest.testCheck2ArraysForEqual3" />
351
-        <item itemvalue="JUnit.ArrazTest" />
352
-        <item itemvalue="JUnit.ArrazTest.testSumValuesOfArrayPostive" />
353
       </list>
345
       </list>
354
     </recent_temporary>
346
     </recent_temporary>
355
   </component>
347
   </component>
370
       <workItem from="1544045942928" duration="2151000" />
362
       <workItem from="1544045942928" duration="2151000" />
371
       <workItem from="1544048104554" duration="1398000" />
363
       <workItem from="1544048104554" duration="1398000" />
372
       <workItem from="1544060926907" duration="4177000" />
364
       <workItem from="1544060926907" duration="4177000" />
373
-      <workItem from="1544125434968" duration="10376000" />
365
+      <workItem from="1544125434968" duration="11066000" />
374
     </task>
366
     </task>
375
     <task id="LOCAL-00001" summary="readme and docs">
367
     <task id="LOCAL-00001" summary="readme and docs">
376
       <created>1544021313039</created>
368
       <created>1544021313039</created>
383
     <servers />
375
     <servers />
384
   </component>
376
   </component>
385
   <component name="TestHistory">
377
   <component name="TestHistory">
386
-    <history-entry file="ArrazTest_testSortArrayIntoEvensThenOdds2 - 2018.12.06 at 19h 44m 17s.xml">
387
-      <configuration name="ArrazTest.testSortArrayIntoEvensThenOdds2" configurationId="JUnit" />
388
-    </history-entry>
389
-    <history-entry file="ArrazTest - 2018.12.06 at 19h 44m 27s.xml">
390
-      <configuration name="ArrazTest" configurationId="JUnit" />
391
-    </history-entry>
392
-    <history-entry file="ArrazTest_testSumValuesOfArrayPostive - 2018.12.06 at 19h 45m 11s.xml">
393
-      <configuration name="ArrazTest.testSumValuesOfArrayPostive" configurationId="JUnit" />
394
-    </history-entry>
395
     <history-entry file="ArrazTest - 2018.12.06 at 19h 59m 51s.xml">
378
     <history-entry file="ArrazTest - 2018.12.06 at 19h 59m 51s.xml">
396
       <configuration name="ArrazTest" configurationId="JUnit" />
379
       <configuration name="ArrazTest" configurationId="JUnit" />
397
     </history-entry>
380
     </history-entry>
413
     <history-entry file="ArrazTest_testFindIndexOf2 - 2018.12.06 at 20h 03m 57s.xml">
396
     <history-entry file="ArrazTest_testFindIndexOf2 - 2018.12.06 at 20h 03m 57s.xml">
414
       <configuration name="ArrazTest.testFindIndexOf2" configurationId="JUnit" />
397
       <configuration name="ArrazTest.testFindIndexOf2" configurationId="JUnit" />
415
     </history-entry>
398
     </history-entry>
399
+    <history-entry file="ArrazTest_testCopyArrayByInterator1 - 2018.12.06 at 20h 18m 09s.xml">
400
+      <configuration name="ArrazTest.testCopyArrayByInterator1" configurationId="JUnit" />
401
+    </history-entry>
402
+    <history-entry file="ArrazTest_testCopyArrayByInterator2 - 2018.12.06 at 20h 18m 15s.xml">
403
+      <configuration name="ArrazTest.testCopyArrayByInterator2" configurationId="JUnit" />
404
+    </history-entry>
405
+    <history-entry file="ArrazTest - 2018.12.06 at 20h 18m 25s.xml">
406
+      <configuration name="ArrazTest" configurationId="JUnit" />
407
+    </history-entry>
416
   </component>
408
   </component>
417
   <component name="TimeTrackingManager">
409
   <component name="TimeTrackingManager">
418
-    <option name="totallyTimeSpent" value="21524000" />
410
+    <option name="totallyTimeSpent" value="22214000" />
419
   </component>
411
   </component>
420
   <component name="ToolWindowManager">
412
   <component name="ToolWindowManager">
421
     <frame x="0" y="22" width="1280" height="739" extended-state="0" />
413
     <frame x="0" y="22" width="1280" height="739" extended-state="0" />
480
         </state>
472
         </state>
481
       </provider>
473
       </provider>
482
     </entry>
474
     </entry>
483
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
475
+    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
484
       <provider selected="true" editor-type-id="text-editor">
476
       <provider selected="true" editor-type-id="text-editor">
485
-        <state relative-caret-position="280">
486
-          <caret line="81" column="20" selection-start-line="81" selection-start-column="20" selection-end-line="81" selection-end-column="20" />
477
+        <state relative-caret-position="3090">
478
+          <caret line="206" column="37" lean-forward="true" selection-start-line="206" selection-start-column="37" selection-end-line="206" selection-end-column="37" />
487
           <folding>
479
           <folding>
488
             <element signature="imports" expanded="true" />
480
             <element signature="imports" expanded="true" />
489
-            <element signature="e#504#505#0" expanded="true" />
490
-            <element signature="e#561#562#0" expanded="true" />
491
-            <element signature="e#616#617#0" expanded="true" />
492
-            <element signature="e#674#675#0" expanded="true" />
493
-            <element signature="e#1783#1784#0" expanded="true" />
494
-            <element signature="e#1810#1811#0" expanded="true" />
495
-            <element signature="e#4880#4881#0" expanded="true" />
496
-            <element signature="e#4918#4919#0" expanded="true" />
481
+            <element signature="e#8537#8546#0" expanded="true" />
482
+            <element signature="e#8823#8832#0" expanded="true" />
497
           </folding>
483
           </folding>
498
         </state>
484
         </state>
499
       </provider>
485
       </provider>
500
     </entry>
486
     </entry>
501
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
487
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
502
       <provider selected="true" editor-type-id="text-editor">
488
       <provider selected="true" editor-type-id="text-editor">
503
-        <state relative-caret-position="386">
504
-          <caret line="203" lean-forward="true" selection-start-line="203" selection-end-line="203" />
489
+        <state relative-caret-position="1335">
490
+          <caret line="89" column="9" lean-forward="true" selection-start-line="89" selection-start-column="9" selection-end-line="89" selection-end-column="9" />
505
           <folding>
491
           <folding>
506
             <element signature="imports" expanded="true" />
492
             <element signature="imports" expanded="true" />
507
-            <element signature="e#8537#8546#0" expanded="true" />
508
-            <element signature="e#8823#8832#0" expanded="true" />
493
+            <element signature="e#504#505#0" expanded="true" />
494
+            <element signature="e#561#562#0" expanded="true" />
495
+            <element signature="e#616#617#0" expanded="true" />
496
+            <element signature="e#674#675#0" expanded="true" />
497
+            <element signature="e#4880#4881#0" expanded="true" />
498
+            <element signature="e#4918#4919#0" expanded="true" />
509
           </folding>
499
           </folding>
510
         </state>
500
         </state>
511
       </provider>
501
       </provider>

+ 11
- 2
arraz/src/main/java/Arraz.java ファイルの表示

1
 import java.util.ArrayList;
1
 import java.util.ArrayList;
2
+import java.util.Arrays;
3
+import java.util.Iterator;
2
 import java.util.List;
4
 import java.util.List;
3
 
5
 
4
 public class Arraz {
6
 public class Arraz {
78
         return output;
80
         return output;
79
     }
81
     }
80
 
82
 
81
-    public int[] copyArrayByInterator(){
82
-        return null;
83
+    public Integer[] copyArrayByInterator(Integer[] arr){
84
+        Integer[] output = new Integer[arr.length];
85
+        int count = 0;
86
+        Iterator iterator = Arrays.asList(arr).iterator();
87
+        while(iterator.hasNext()){
88
+            output[count] = Integer.parseInt(iterator.next().toString());
89
+            count++;
90
+        }
91
+        return output;
83
     }
92
     }
84
 
93
 
85
     public int[] removeElementFromArray(int[] arr, int n) {
94
     public int[] removeElementFromArray(int[] arr, int n) {

+ 11
- 1
arraz/src/test/java/ArrazTest.java ファイルの表示

193
 
193
 
194
         int[] actual = arraz.copyArrayByLoop(arr);
194
         int[] actual = arraz.copyArrayByLoop(arr);
195
 
195
 
196
-        Assert.assertEquals(arr, actual);
196
+        Assert.assertArrayEquals(arr, actual);
197
         Assert.assertNotNull(actual);
197
         Assert.assertNotNull(actual);
198
     }
198
     }
199
 
199
 
200
     @Test
200
     @Test
201
     public void testCopyArrayByInterator1(){
201
     public void testCopyArrayByInterator1(){
202
+        Integer[] arr = new Integer[] {1,2,3,4,5,6,7,8};
203
+
204
+        Integer[] actual = arraz.copyArrayByInterator(arr);
202
 
205
 
206
+        Assert.assertArrayEquals(arr, actual);
207
+        Assert.assertNotNull(actual);
203
     }
208
     }
204
 
209
 
205
     @Test
210
     @Test
206
     public void testCopyArrayByInterator2(){
211
     public void testCopyArrayByInterator2(){
212
+        Integer[] arr = new Integer[] {1,2,3,4,5,6,7,8};
207
 
213
 
214
+        Integer[] actual = arraz.copyArrayByInterator(arr);
215
+
216
+        Assert.assertArrayEquals(arr, actual);
217
+        Assert.assertNotNull(actual);
208
     }
218
     }
209
 
219
 
210
     @Test
220
     @Test