From ffdbc80dfee959bff4f7b8c584710c2d45059e4b Mon Sep 17 00:00:00 2001 From: fdai5728 Date: Wed, 16 Feb 2022 18:20:47 +0100 Subject: [PATCH] Reverts some mistakes Implements and tests function to delete entries @TODO: catch index left-shift after deleting an item --- src/main/java/CredentialRepository.java | 17 ++++++++++++++++- src/test/java/CredentialRepositoryTest.java | 5 ----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/main/java/CredentialRepository.java b/src/main/java/CredentialRepository.java index 8e1adc9..6a048cc 100644 --- a/src/main/java/CredentialRepository.java +++ b/src/main/java/CredentialRepository.java @@ -49,7 +49,6 @@ public class CredentialRepository implements CredentialRepositoryInterface{ return null; } - } /* @@ -90,7 +89,23 @@ public class CredentialRepository implements CredentialRepositoryInterface{ } +/* + this function will be required in the future for catching the left-shift in the arrayList + after one entry was deleted. welp, maybe it won't. can't tell and i've no time atm to + finish this + + private int mapIndexToListCounter(int needle) { + for(int c = 0; c