-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathMainArray.java
More file actions
38 lines (32 loc) · 941 Bytes
/
MainArray.java
File metadata and controls
38 lines (32 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
*
* Test for ArrayStorage
*/
public class MainArray {
static ArrayStorage arrayStorage = new ArrayStorage();
public static void main(String[] args) {
Resume r1 = new Resume();
r1.uuid = "uuid1";
Resume r2 = new Resume();
r2.uuid = "uuid2";
Resume r3 = new Resume();
r3.uuid = "uuid3";
arrayStorage.save(r1);
arrayStorage.save(r2);
arrayStorage.save(r3);
System.out.println("Get r1: " + arrayStorage.get(r1.uuid));
System.out.println("Size: " + arrayStorage.size());
printAll();
arrayStorage.delete(r1.uuid);
printAll();
arrayStorage.clear();
printAll();
System.out.println("Size: " + arrayStorage.size());
}
static void printAll() {
System.out.println("\nGet All");
for (Resume r : arrayStorage.getAll()) {
System.out.println(r);
}
}
}