style: enable HideUtilityClassConstructor in checkstyle (#5147)

This commit is contained in:
Piotr Idzik
2024-05-08 08:58:29 +02:00
committed by GitHub
parent 030bb91d05
commit d3bb691f59
285 changed files with 895 additions and 339 deletions

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
*/
public class IndexOfRightMostSetBit {
public final class IndexOfRightMostSetBit {
private IndexOfRightMostSetBit() {
}
public static int indexOfRightMostSetBit(int n) {
if (n == 0) {
return -1; // No set bits

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
*/
public class IsEven {
public final class IsEven {
private IsEven() {
}
public static boolean isEven(int number) {
return (number & 1) == 0;
}

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
*/
public class IsPowerTwo {
public final class IsPowerTwo {
private IsPowerTwo() {
}
public static boolean isPowerTwo(int number) {
if (number <= 0) {
return false;

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
*/
public class NonRepeatingNumberFinder {
public final class NonRepeatingNumberFinder {
private NonRepeatingNumberFinder() {
}
public static int findNonRepeatingNumber(int[] arr) {
int result = 0;

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi
*/
public class NumbersDifferentSigns {
public final class NumbersDifferentSigns {
private NumbersDifferentSigns() {
}
public static boolean differentSigns(int num1, int num2) {
return (num1 ^ num2) < 0;

View File

@ -5,7 +5,9 @@ package com.thealgorithms.bitmanipulation;
* @author Bama Charan Chhandogi
*/
public class ReverseBits {
public final class ReverseBits {
private ReverseBits() {
}
public static int reverseBits(int n) {
int result = 0;