mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
style: enable RedundantModifier
in checkstyle (#5140)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user