Skip to content

Commit b3903f5

Browse files
authored
style: enable RedundantModifier in checkstyle (TheAlgorithms#5140)
1 parent 1e2d7e9 commit b3903f5

38 files changed

+59
-59
lines changed

checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<!-- Modifier Checks -->
149149
<!-- See https://checkstyle.org/checks/modifier/index.html -->
150150
<module name="ModifierOrder"/>
151-
<!-- TODO <module name="RedundantModifier"/> -->
151+
<module name="RedundantModifier"/>
152152

153153
<!-- Checks for blocks. You know, those {}'s -->
154154
<!-- See https://checkstyle.org/checks/blocks/index.html -->

src/main/java/com/thealgorithms/datastructures/bags/Bag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private class ListIterator<Element> implements Iterator<Element> {
8080

8181
private Node<Element> currentElement;
8282

83-
public ListIterator(Node<Element> firstElement) {
83+
ListIterator(Node<Element> firstElement) {
8484
currentElement = firstElement;
8585
}
8686

src/main/java/com/thealgorithms/datastructures/bloomfilter/BloomFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private class Hash<T> {
4242

4343
int index;
4444

45-
public Hash(int index) {
45+
Hash(int index) {
4646
this.index = index;
4747
}
4848

src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static class CircularPointer {
4343
private int pointer;
4444
private final int max;
4545

46-
public CircularPointer(int pointer, int max) {
46+
CircularPointer(int pointer, int max) {
4747
this.pointer = pointer;
4848
this.max = max;
4949
}

src/main/java/com/thealgorithms/datastructures/caches/LFUCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private class Node {
1717
private Node previous;
1818
private Node next;
1919

20-
public Node(K key, V value, int frequency) {
20+
Node(K key, V value, int frequency) {
2121
this.key = key;
2222
this.value = value;
2323
this.frequency = frequency;

src/main/java/com/thealgorithms/datastructures/caches/LRUCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ static final class Entry<I, J> {
126126
private I key;
127127
private J value;
128128

129-
public Entry() {
129+
Entry() {
130130
}
131131

132-
public Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
132+
Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
133133
this.preEntry = preEntry;
134134
this.nextEntry = nextEntry;
135135
this.key = key;

src/main/java/com/thealgorithms/datastructures/caches/MRUCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ static final class Entry<I, J> {
124124
private I key;
125125
private J value;
126126

127-
public Entry() {
127+
Entry() {
128128
}
129129

130-
public Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
130+
Entry(Entry<I, J> preEntry, Entry<I, J> nextEntry, I key, J value) {
131131
this.preEntry = preEntry;
132132
this.nextEntry = nextEntry;
133133
this.key = key;

src/main/java/com/thealgorithms/datastructures/crdt/GCounter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class GCounter {
2626
*
2727
* @param n The number of nodes in the cluster.
2828
*/
29-
public GCounter(int myId, int n) {
29+
GCounter(int myId, int n) {
3030
this.myId = myId;
3131
this.n = n;
3232
this.P = new HashMap<>();

src/main/java/com/thealgorithms/datastructures/crdt/LWWElementSet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Element {
2626
* @param timestamp The timestamp associated with the element.
2727
* @param bias The bias of the element (ADDS or REMOVALS).
2828
*/
29-
public Element(String key, int timestamp, Bias bias) {
29+
Element(String key, int timestamp, Bias bias) {
3030
this.key = key;
3131
this.timestamp = timestamp;
3232
this.bias = bias;
@@ -49,7 +49,7 @@ class LWWElementSet {
4949
/**
5050
* Constructs an empty LWWElementSet.
5151
*/
52-
public LWWElementSet() {
52+
LWWElementSet() {
5353
this.addSet = new HashMap<>();
5454
this.removeSet = new HashMap<>();
5555
}

src/main/java/com/thealgorithms/datastructures/crdt/PNCounter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PNCounter {
2828
* @param myId The identifier of the current node.
2929
* @param n The number of nodes in the cluster.
3030
*/
31-
public PNCounter(int myId, int n) {
31+
PNCounter(int myId, int n) {
3232
this.myId = myId;
3333
this.n = n;
3434
this.P = new HashMap<>();

0 commit comments

Comments
 (0)