Skip to content

Commit 5f753b5

Browse files
author
alxkm
committed
checkstyle: fix formatting
1 parent 6324d48 commit 5f753b5

File tree

2 files changed

+3
-4
lines changed
  • src
    • main/java/com/thealgorithms/datastructures/hashmap/hashing
    • test/java/com/thealgorithms/datastructures/hashmap/hashing

2 files changed

+3
-4
lines changed

src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ public void delete(K key) {
166166
// Traverse the list to find and delete the node
167167
Node<K, V> current = head;
168168
while (current.getNext() != null) {
169-
if ((key == null && current.getNext().getKey() == null) ||
170-
(current.getNext().getKey() != null && current.getNext().getKey().equals(key))) {
169+
if ((key == null && current.getNext().getKey() == null) || (current.getNext().getKey() != null && current.getNext().getKey().equals(key))) {
171170
current.setNext(current.getNext().getNext());
172171
return;
173172
}
@@ -252,7 +251,7 @@ public V getValue() {
252251
return value;
253252
}
254253

255-
public void setValue(V value) { // This method allows updating the value
254+
public void setValue(V value) { // This method allows updating the value
256255
this.value = value;
257256
}
258257

src/test/java/com/thealgorithms/datastructures/hashmap/hashing/HashMapTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,4 @@ public void testDeleteMiddleElementOfBucket() {
150150
assertEquals("Value1", hashMap.search(1));
151151
assertEquals("Value7", hashMap.search(7));
152152
}
153-
}
153+
}

0 commit comments

Comments
 (0)