import model.Resume; import storage.ArrayStorage; public class MainTestArrayStorage { static final ArrayStorage ARRAY_STORAGE = new ArrayStorage(); public static void main(String[] args) throws Exception{ Resume r1 = new Resume("Name1"); Resume r2 = new Resume("Name2"); Resume r3 = new Resume("Name3"); ARRAY_STORAGE.save(r1); ARRAY_STORAGE.save(r2); ARRAY_STORAGE.save(r3); System.out.println("Get r1: " + ARRAY_STORAGE.get(r1.getUuid())); System.out.println("Size: " + ARRAY_STORAGE.size()); //System.out.println("Get dummy: " + ARRAY_STORAGE.get("dummy")); printAll(); ARRAY_STORAGE.delete(r1.getUuid()); printAll(); ARRAY_STORAGE.clear(); printAll(); System.out.println("Size: " + ARRAY_STORAGE.size()); } static void printAll() { System.out.println("\nGet All"); for (Resume r : ARRAY_STORAGE.getAllSorted()) { System.out.println(r); } } }