We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c32b7f commit dececa5Copy full SHA for dececa5
src/main/java/com/github/jinahya/bit/io/BitIoConstants.java
@@ -1,7 +1,15 @@
1
package com.github.jinahya.bit.io;
2
3
+/**
4
+ * Defines constants for bit-io.
5
+ *
6
+ * @author Jin Kwon <onacit_at_gmail.com>\
7
+ */
8
final class BitIoConstants {
9
10
+ /**
11
+ * An array of pre-initialized bit masks.
12
13
private static final int[] MASKS = new int[8];
14
15
static {
@@ -12,10 +20,19 @@ final class BitIoConstants {
20
}
21
22
23
24
+ * Returns a bit mask for specified bit size.
25
26
+ * @param size the number of bits to mask.
27
+ * @return a bit mask.
28
29
static int mask(final int size) {
16
30
return MASKS[size - 1];
17
31
18
32
33
34
+ * Creates a new instance.
35
19
36
private BitIoConstants() {
37
throw new AssertionError("initialization is not allowed");
38
0 commit comments