style: enable RedundantModifier in checkstyle (#5140)

This commit is contained in:
Piotr Idzik
2024-05-03 21:10:49 +02:00
committed by GitHub
parent 1e2d7e9431
commit b3903f5768
38 changed files with 59 additions and 59 deletions

View File

@ -11,15 +11,15 @@ public class LinkedQueue<T> implements Iterable<T> {
T data;
Node<T> next;
public Node() {
Node() {
this(null);
}
public Node(T data) {
Node(T data) {
this(data, null);
}
public Node(T data, Node<T> next) {
Node(T data, Node<T> next) {
this.data = data;
this.next = next;
}

View File

@ -30,7 +30,7 @@ class PriorityQueue {
* Default Constructor
*/
public PriorityQueue() {
PriorityQueue() {
/* If capacity is not defined, default size of 11 would be used
* capacity=max+1 because we cant access 0th element of PQ, and to
* accomodate (max)th elements we need capacity to be max+1.
@ -50,7 +50,7 @@ class PriorityQueue {
* @param size Size of the queue
*/
public PriorityQueue(int size) {
PriorityQueue(int size) {
maxSize = size + 1;
queueArray = new int[maxSize];
nItems = 0;

View File

@ -38,7 +38,7 @@ class Queue {
/**
* init with DEFAULT_CAPACITY
*/
public Queue() {
Queue() {
this(DEFAULT_CAPACITY);
}
@ -47,7 +47,7 @@ class Queue {
*
* @param size Size of the new queue
*/
public Queue(int size) {
Queue(int size) {
maxSize = size;
queueArray = new int[size];
front = 0;