[jruby-joni] 53/194: bitset changes

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:25 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 887f4243c4bc2ee92253c7532d2b3e88cb91521e
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sat Dec 30 00:37:59 2017 +0100

    bitset changes
---
 src/org/joni/BitSet.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/org/joni/BitSet.java b/src/org/joni/BitSet.java
index b58d5eb..2e53217 100644
--- a/src/org/joni/BitSet.java
+++ b/src/org/joni/BitSet.java
@@ -22,8 +22,8 @@ package org.joni;
 public final class BitSet {
     static final int BITS_PER_BYTE = 8;
     public static final int SINGLE_BYTE_SIZE = (1 << BITS_PER_BYTE);
-    private static final int BITS_IN_ROOM = 4 * BITS_PER_BYTE;
-    static final int BITSET_SIZE = (SINGLE_BYTE_SIZE / BITS_IN_ROOM);
+    public static final int BITS_IN_ROOM = 4 * BITS_PER_BYTE;
+    public static final int BITSET_SIZE = (SINGLE_BYTE_SIZE / BITS_IN_ROOM);
     static final int ROOM_SHIFT = log2(BITS_IN_ROOM);
 
     final int[] bits = new int[BITSET_SIZE];
@@ -39,6 +39,10 @@ public final class BitSet {
         return buffer.toString();
     }
 
+    public int getBits(int pos) {
+        return bits[pos];
+    }
+
     public boolean at(int pos) {
         return (bits[pos >>> ROOM_SHIFT] & bit(pos)) != 0;
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list