Selaa lähdekoodia

{started setting up part 3}

Jacqueline Joson 6 vuotta sitten
vanhempi
commit
34e64fec1e
4 muutettua tiedostoa jossa 154 lisäystä ja 57 poistoa
  1. 80
    55
      .idea/workspace.xml
  2. 44
    0
      src/main/java/MyMap.java
  3. 0
    2
      src/test/java/MyArrayListTest.java
  4. 30
    0
      src/test/java/MyMapTest.java

+ 80
- 55
.idea/workspace.xml Näytä tiedosto

@@ -2,7 +2,7 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="ada34df4-dfd8-4fb3-8f80-b9a79b2fcc05" name="Default Changelist" comment="">
5
-      <change beforePath="$PROJECT_DIR$/src/test/java/MySetTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" afterDir="false" />
5
+      <change beforePath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" afterDir="false" />
6 6
     </list>
7 7
     <ignored path="$PROJECT_DIR$/target/" />
8 8
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -26,7 +26,7 @@
26 26
           <entry key="MODULES/mdl-generics" value="1" />
27 27
           <entry key="class" value="4" />
28 28
           <entry key="iml" value="1" />
29
-          <entry key="java" value="4" />
29
+          <entry key="java" value="6" />
30 30
           <entry key="md" value="1" />
31 31
         </counts>
32 32
       </usages-collector>
@@ -34,20 +34,20 @@
34 34
         <counts>
35 35
           <entry key="CLASS" value="4" />
36 36
           <entry key="IDEA_MODULE" value="1" />
37
-          <entry key="JAVA" value="4" />
37
+          <entry key="JAVA" value="6" />
38 38
           <entry key="Markdown" value="1" />
39 39
           <entry key="UML" value="5" />
40 40
         </counts>
41 41
       </usages-collector>
42 42
       <usages-collector id="statistics.file.extensions.edit">
43 43
         <counts>
44
-          <entry key="java" value="7428" />
44
+          <entry key="java" value="7861" />
45 45
           <entry key="txt" value="59" />
46 46
         </counts>
47 47
       </usages-collector>
48 48
       <usages-collector id="statistics.file.types.edit">
49 49
         <counts>
50
-          <entry key="JAVA" value="7428" />
50
+          <entry key="JAVA" value="7861" />
51 51
           <entry key="PLAIN_TEXT" value="59" />
52 52
         </counts>
53 53
       </usages-collector>
@@ -58,7 +58,7 @@
58 58
       <file pinned="false" current-in-tab="false">
59 59
         <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
60 60
           <provider selected="true" editor-type-id="text-editor">
61
-            <state relative-caret-position="251">
61
+            <state relative-caret-position="986">
62 62
               <caret line="58" selection-start-line="58" selection-end-line="58" />
63 63
               <folding>
64 64
                 <element signature="e#67#68#0" expanded="true" />
@@ -72,10 +72,29 @@
72 72
           </provider>
73 73
         </entry>
74 74
       </file>
75
+      <file pinned="false" current-in-tab="true">
76
+        <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
77
+          <provider selected="true" editor-type-id="text-editor">
78
+            <state relative-caret-position="335">
79
+              <caret line="39" column="21" selection-start-line="39" selection-start-column="21" selection-end-line="39" selection-end-column="21" />
80
+              <folding>
81
+                <element signature="e#233#234#0" expanded="true" />
82
+                <element signature="e#266#267#0" expanded="true" />
83
+                <element signature="e#352#353#0" expanded="true" />
84
+                <element signature="e#378#379#0" expanded="true" />
85
+                <element signature="e#417#418#0" expanded="true" />
86
+                <element signature="e#438#439#0" expanded="true" />
87
+                <element signature="e#543#544#0" expanded="true" />
88
+                <element signature="e#570#571#0" expanded="true" />
89
+              </folding>
90
+            </state>
91
+          </provider>
92
+        </entry>
93
+      </file>
75 94
       <file pinned="false" current-in-tab="false">
76 95
         <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
77 96
           <provider selected="true" editor-type-id="text-editor">
78
-            <state relative-caret-position="-94">
97
+            <state relative-caret-position="170">
79 98
               <caret line="10" column="46" lean-forward="true" selection-start-line="10" selection-start-column="46" selection-end-line="10" selection-end-column="46" />
80 99
               <folding>
81 100
                 <element signature="e#84#85#0" expanded="true" />
@@ -97,11 +116,11 @@
97 116
           </provider>
98 117
         </entry>
99 118
       </file>
100
-      <file pinned="false" current-in-tab="true">
119
+      <file pinned="false" current-in-tab="false">
101 120
         <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
102 121
           <provider selected="true" editor-type-id="text-editor">
103
-            <state relative-caret-position="259">
104
-              <caret line="74" column="34" lean-forward="true" selection-start-line="74" selection-start-column="34" selection-end-line="74" selection-end-column="34" />
122
+            <state relative-caret-position="1411">
123
+              <caret line="83" column="14" lean-forward="true" selection-start-line="83" selection-start-column="14" selection-end-line="83" selection-end-column="14" />
105 124
               <folding>
106 125
                 <element signature="imports" expanded="true" />
107 126
                 <element signature="e#210#219#0" expanded="true" />
@@ -113,10 +132,11 @@
113 132
       <file pinned="false" current-in-tab="false">
114 133
         <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
115 134
           <provider selected="true" editor-type-id="text-editor">
116
-            <state relative-caret-position="-410">
117
-              <caret line="11" column="66" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="66" />
135
+            <state relative-caret-position="34">
136
+              <caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
118 137
               <folding>
119 138
                 <element signature="imports" expanded="true" />
139
+                <element signature="e#282#291#0" expanded="true" />
120 140
               </folding>
121 141
             </state>
122 142
           </provider>
@@ -127,8 +147,8 @@
127 147
   <component name="FileTemplateManagerImpl">
128 148
     <option name="RECENT_TEMPLATES">
129 149
       <list>
130
-        <option value="Class" />
131 150
         <option value="JUnit4 Test Class" />
151
+        <option value="Class" />
132 152
       </list>
133 153
     </option>
134 154
   </component>
@@ -140,8 +160,9 @@
140 160
       <list>
141 161
         <option value="$PROJECT_DIR$/src/main/java/MyArrayList.java" />
142 162
         <option value="$PROJECT_DIR$/src/main/java/MySet.java" />
143
-        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
144 163
         <option value="$PROJECT_DIR$/src/test/java/MySetTest.java" />
164
+        <option value="$PROJECT_DIR$/src/test/java/MyArrayListTest.java" />
165
+        <option value="$PROJECT_DIR$/src/main/java/MyMap.java" />
145 166
       </list>
146 167
     </option>
147 168
   </component>
@@ -215,7 +236,7 @@
215 236
   <component name="PropertiesComponent">
216 237
     <property name="WebServerToolWindowFactoryState" value="false" />
217 238
     <property name="aspect.path.notification.shown" value="true" />
218
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542420975158" />
239
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542421756423" />
219 240
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
220 241
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit4" value="" />
221 242
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.includeInheritedMembers" value="true" />
@@ -319,26 +340,11 @@
319 340
       <option name="number" value="Default" />
320 341
       <option name="presentableId" value="Default" />
321 342
       <updated>1542236797011</updated>
322
-      <workItem from="1542236798436" duration="36119000" />
343
+      <workItem from="1542236798436" duration="36911000" />
323 344
     </task>
324 345
     <servers />
325 346
   </component>
326 347
   <component name="TestHistory">
327
-    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 02m 27s.xml">
328
-      <configuration name="MySetTest.addTest" configurationId="JUnit" />
329
-    </history-entry>
330
-    <history-entry file="MySetTest_addTest - 2018.11.16 at 18h 02m 31s.xml">
331
-      <configuration name="MySetTest.addTest" configurationId="JUnit" />
332
-    </history-entry>
333
-    <history-entry file="MySetTest_getTest - 2018.11.16 at 18h 04m 18s.xml">
334
-      <configuration name="MySetTest.getTest" configurationId="JUnit" />
335
-    </history-entry>
336
-    <history-entry file="MySetTest_sizeTest - 2018.11.16 at 18h 09m 05s.xml">
337
-      <configuration name="MySetTest.sizeTest" configurationId="JUnit" />
338
-    </history-entry>
339
-    <history-entry file="MySetTest_clearTest - 2018.11.16 at 18h 10m 53s.xml">
340
-      <configuration name="MySetTest.clearTest" configurationId="JUnit" />
341
-    </history-entry>
342 348
     <history-entry file="MySetTest_clearTest - 2018.11.16 at 18h 11m 41s.xml">
343 349
       <configuration name="MySetTest.clearTest" configurationId="JUnit" />
344 350
     </history-entry>
@@ -354,9 +360,24 @@
354 360
     <history-entry file="MySetTest_isEmptyTest2 - 2018.11.16 at 21h 11m 58s.xml">
355 361
       <configuration name="MySetTest.isEmptyTest2" configurationId="JUnit" />
356 362
     </history-entry>
363
+    <history-entry file="MySetTest_containsTest - 2018.11.16 at 21h 14m 23s.xml">
364
+      <configuration name="MySetTest.containsTest" configurationId="JUnit" />
365
+    </history-entry>
366
+    <history-entry file="MySetTest_containsNopeTest - 2018.11.16 at 21h 15m 31s.xml">
367
+      <configuration name="MySetTest.containsNopeTest" configurationId="JUnit" />
368
+    </history-entry>
369
+    <history-entry file="MySetTest - 2018.11.16 at 21h 15m 51s.xml">
370
+      <configuration name="MySetTest" configurationId="JUnit" />
371
+    </history-entry>
372
+    <history-entry file="MyArrayListTest - 2018.11.16 at 21h 16m 01s.xml">
373
+      <configuration name="MyArrayListTest" configurationId="JUnit" />
374
+    </history-entry>
375
+    <history-entry file="All_in_generics - 2018.11.16 at 21h 16m 16s.xml">
376
+      <configuration name="All in generics" configurationId="JUnit" />
377
+    </history-entry>
357 378
   </component>
358 379
   <component name="TimeTrackingManager">
359
-    <option name="totallyTimeSpent" value="36119000" />
380
+    <option name="totallyTimeSpent" value="36911000" />
360 381
   </component>
361 382
   <component name="ToolWindowManager">
362 383
     <frame x="0" y="23" width="1280" height="712" extended-state="0" />
@@ -398,20 +419,6 @@
398 419
   <component name="VcsContentAnnotationSettings">
399 420
     <option name="myLimit" value="2678400000" />
400 421
   </component>
401
-  <component name="XDebuggerManager">
402
-    <breakpoint-manager>
403
-      <breakpoints>
404
-        <line-breakpoint enabled="true" type="java-method">
405
-          <url>file://$PROJECT_DIR$/src/main/java/MySet.java</url>
406
-          <line>17</line>
407
-          <properties class="MySet" method="add">
408
-            <option name="EMULATED" value="true" />
409
-          </properties>
410
-          <option name="timeStamp" value="14" />
411
-        </line-breakpoint>
412
-      </breakpoints>
413
-    </breakpoint-manager>
414
-  </component>
415 422
   <component name="editorHistoryManager">
416 423
     <entry file="file://$PROJECT_DIR$/generics.iml">
417 424
       <provider selected="true" editor-type-id="text-editor" />
@@ -535,7 +542,7 @@
535 542
     </entry>
536 543
     <entry file="file://$PROJECT_DIR$/src/main/java/MyArrayList.java">
537 544
       <provider selected="true" editor-type-id="text-editor">
538
-        <state relative-caret-position="251">
545
+        <state relative-caret-position="986">
539 546
           <caret line="58" selection-start-line="58" selection-end-line="58" />
540 547
           <folding>
541 548
             <element signature="e#67#68#0" expanded="true" />
@@ -548,19 +555,31 @@
548 555
         </state>
549 556
       </provider>
550 557
     </entry>
558
+    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
559
+      <provider selected="true" editor-type-id="text-editor">
560
+        <state relative-caret-position="1411">
561
+          <caret line="83" column="14" lean-forward="true" selection-start-line="83" selection-start-column="14" selection-end-line="83" selection-end-column="14" />
562
+          <folding>
563
+            <element signature="imports" expanded="true" />
564
+            <element signature="e#210#219#0" expanded="true" />
565
+          </folding>
566
+        </state>
567
+      </provider>
568
+    </entry>
551 569
     <entry file="file://$PROJECT_DIR$/src/test/java/MyArrayListTest.java">
552 570
       <provider selected="true" editor-type-id="text-editor">
553
-        <state relative-caret-position="-410">
554
-          <caret line="11" column="66" selection-start-line="11" selection-start-column="59" selection-end-line="11" selection-end-column="66" />
571
+        <state relative-caret-position="34">
572
+          <caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
555 573
           <folding>
556 574
             <element signature="imports" expanded="true" />
575
+            <element signature="e#282#291#0" expanded="true" />
557 576
           </folding>
558 577
         </state>
559 578
       </provider>
560 579
     </entry>
561 580
     <entry file="file://$PROJECT_DIR$/src/main/java/MySet.java">
562 581
       <provider selected="true" editor-type-id="text-editor">
563
-        <state relative-caret-position="-94">
582
+        <state relative-caret-position="170">
564 583
           <caret line="10" column="46" lean-forward="true" selection-start-line="10" selection-start-column="46" selection-end-line="10" selection-end-column="46" />
565 584
           <folding>
566 585
             <element signature="e#84#85#0" expanded="true" />
@@ -581,13 +600,19 @@
581 600
         </state>
582 601
       </provider>
583 602
     </entry>
584
-    <entry file="file://$PROJECT_DIR$/src/test/java/MySetTest.java">
603
+    <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
585 604
       <provider selected="true" editor-type-id="text-editor">
586
-        <state relative-caret-position="259">
587
-          <caret line="74" column="34" lean-forward="true" selection-start-line="74" selection-start-column="34" selection-end-line="74" selection-end-column="34" />
605
+        <state relative-caret-position="335">
606
+          <caret line="39" column="21" selection-start-line="39" selection-start-column="21" selection-end-line="39" selection-end-column="21" />
588 607
           <folding>
589
-            <element signature="imports" expanded="true" />
590
-            <element signature="e#210#219#0" expanded="true" />
608
+            <element signature="e#233#234#0" expanded="true" />
609
+            <element signature="e#266#267#0" expanded="true" />
610
+            <element signature="e#352#353#0" expanded="true" />
611
+            <element signature="e#378#379#0" expanded="true" />
612
+            <element signature="e#417#418#0" expanded="true" />
613
+            <element signature="e#438#439#0" expanded="true" />
614
+            <element signature="e#543#544#0" expanded="true" />
615
+            <element signature="e#570#571#0" expanded="true" />
591 616
           </folding>
592 617
         </state>
593 618
       </provider>

+ 44
- 0
src/main/java/MyMap.java Näytä tiedosto

@@ -0,0 +1,44 @@
1
+public class MyMap <K, V> {
2
+
3
+    private K [] key;
4
+    private V [] value;
5
+    private int index;
6
+
7
+
8
+    public MyMap(K[] key, V[] value) {
9
+        this.key = key;
10
+        this.value = value;
11
+    }
12
+    public MyMap() {}
13
+
14
+    public MyMap(int index) {
15
+        this.index = index;
16
+    }
17
+
18
+    public void clear() {
19
+
20
+    }
21
+
22
+    public boolean containsKey(V value) {
23
+        return true;
24
+    }
25
+
26
+    public boolean containsValue(K key) {
27
+        return true;
28
+    }
29
+
30
+    public V get(K key) {
31
+        return null;
32
+        return V;
33
+    }
34
+
35
+    public boolean isEmpty() {
36
+        return true;
37
+    }
38
+
39
+    public void add(K key, V value) {
40
+        //put method
41
+    }
42
+
43
+
44
+}

+ 0
- 2
src/test/java/MyArrayListTest.java Näytä tiedosto

@@ -1,8 +1,6 @@
1 1
 import org.junit.Assert;
2 2
 import org.junit.Test;
3 3
 
4
-import static org.junit.Assert.*;
5
-
6 4
 public class MyArrayListTest {
7 5
 
8 6
     @Test

+ 30
- 0
src/test/java/MyMapTest.java Näytä tiedosto

@@ -0,0 +1,30 @@
1
+import org.junit.Test;
2
+
3
+import static org.junit.Assert.*;
4
+
5
+public class MyMapTest {
6
+
7
+    @Test
8
+    public void clear() {
9
+    }
10
+
11
+    @Test
12
+    public void containsKey() {
13
+    }
14
+
15
+    @Test
16
+    public void containsValue() {
17
+    }
18
+
19
+    @Test
20
+    public void get() {
21
+    }
22
+
23
+    @Test
24
+    public void isEmpty() {
25
+    }
26
+
27
+    @Test
28
+    public void add() {
29
+    }
30
+}