Skip to content

Commit 0f339b1

Browse files
authored
Update and rename SingleBitOperators.java to SingleBitOperator.java
1 parent 16e230c commit 0f339b1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperators.java renamed to src/main/java/com/thealgorithms/bitmanipulation/SingleBitOperator.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44
* Author: lukasb1b (https://github.com/lukasb1b)
55
*/
66

7-
public class SingleBitOperators {
7+
public class final SingleBitOperators {
88
/**
99
* Flip the bit at position 'bit' in 'num'
1010
*/
11-
public static int flipBit(int num, int bit) {
11+
public static int flipBit(final int num, final int bit) {
1212
return num ^ (1 << bit);
1313
}
1414
/**
1515
* Set the bit at position 'bit' to 1 in the 'num' variable
1616
*/
17-
public static int setBit(int num, int bit) {
17+
public static int setBit(final int num,final int bit) {
1818
return num | (1 << bit);
1919
}
2020
/**
2121
* Clears the bit located at 'bit' from 'num'
2222
*/
23-
public static int clearBit(int num, int bit) {
23+
public static int clearBit(final int num,final int bit) {
2424
return num & ~(1 << bit);
2525
}
2626
/**
2727
* Get the bit located at 'bit' from 'num'
2828
*/
29-
public static int getBit(int num, int bit) {
29+
public static int getBit(final int num,final int bit) {
3030
return ((num >> bit) & 1);
3131
}
3232
}

0 commit comments

Comments
 (0)