Documentation of 'org.hsqldb.map.BitMap' Java class
BitMap
org.hsqldb.map

Class BitMap



  • public class BitMap
    extends java.lang.Object
    Implementation of a bit map of any size, together with static methods to manipulate int, byte and byte[] values as bit maps.
    Since:
    1.8.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      BitMap(int[] map) 
      BitMap(int initialCapacity, boolean extend) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static byte[] and(byte[] a, byte[] b) 
      static void and(byte[] map, int pos, byte source, int count)
      AND count bits from source with map contents starting at pos
      int countSet(int pos, int count) 
      int countSetBits() 
      int countSetBitsEnd()
      Only for word boundary map size
      static int countSetBitsLow(int map)
      count the set bits at the low end
      int get(int pos) 
      byte[] getBytes() 
      int[] getIntArray() 
      static boolean hasAnyBitSet(byte[] map) 
      static boolean isSet(byte[] map, int pos) 
      static boolean isSet(byte map, int pos) 
      boolean isSet(int pos) 
      static boolean isSet(int map, int pos) 
      static byte[] leftShift(byte[] map, int shiftBits) 
      static byte[] not(byte[] a) 
      static byte[] or(byte[] a, byte[] b) 
      static void or(byte[] map, int pos, byte source, int count)
      OR count bits from source with map contents starting at pos
      static void overlay(byte[] map, int pos, byte source, int count)
      overlay count bits from source on map contents starting at pos
      void reset()
      Resets to blank with original capacity
      static void set(byte[] map, int pos) 
      static byte set(byte map, int pos) 
      int set(int pos)
      Sets pos and returns old value
      static int set(int map, int pos) 
      static int setByte(int map, byte value, int pos)
      copy the byte value into the map at given position (0, 24)
      void setRange(int pos, int count) 
      void setSize(int size) 
      int setValue(int pos, boolean set) 
      int size() 
      static void unset(byte[] map, int pos) 
      int unset(int pos)
      Unsets pos and returns old value
      static int unset(int map, int pos) 
      void unsetRange(int pos, int count) 
      static byte[] xor(byte[] a, byte[] b) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BitMap

        public BitMap(int initialCapacity,
                      boolean extend)
      • BitMap

        public BitMap(int[] map)
    • Method Detail

      • size

        public int size()
      • setSize

        public void setSize(int size)
      • reset

        public void reset()
        Resets to blank with original capacity
      • setRange

        public void setRange(int pos,
                             int count)
      • unsetRange

        public void unsetRange(int pos,
                               int count)
      • setValue

        public int setValue(int pos,
                            boolean set)
      • set

        public int set(int pos)
        Sets pos and returns old value
      • unset

        public int unset(int pos)
        Unsets pos and returns old value
      • get

        public int get(int pos)
      • isSet

        public boolean isSet(int pos)
      • countSet

        public int countSet(int pos,
                            int count)
      • countSetBits

        public int countSetBits()
      • countSetBitsEnd

        public int countSetBitsEnd()
        Only for word boundary map size
      • getIntArray

        public int[] getIntArray()
      • getBytes

        public byte[] getBytes()
      • countSetBitsLow

        public static int countSetBitsLow(int map)
        count the set bits at the low end
      • setByte

        public static int setByte(int map,
                                  byte value,
                                  int pos)
        copy the byte value into the map at given position (0, 24)
      • set

        public static int set(int map,
                              int pos)
      • set

        public static byte set(byte map,
                               int pos)
      • unset

        public static int unset(int map,
                                int pos)
      • isSet

        public static boolean isSet(int map,
                                    int pos)
      • isSet

        public static boolean isSet(byte map,
                                    int pos)
      • isSet

        public static boolean isSet(byte[] map,
                                    int pos)
      • unset

        public static void unset(byte[] map,
                                 int pos)
      • set

        public static void set(byte[] map,
                               int pos)
      • and

        public static void and(byte[] map,
                               int pos,
                               byte source,
                               int count)
        AND count bits from source with map contents starting at pos
      • or

        public static void or(byte[] map,
                              int pos,
                              byte source,
                              int count)
        OR count bits from source with map contents starting at pos
      • overlay

        public static void overlay(byte[] map,
                                   int pos,
                                   byte source,
                                   int count)
        overlay count bits from source on map contents starting at pos
      • and

        public static byte[] and(byte[] a,
                                 byte[] b)
      • or

        public static byte[] or(byte[] a,
                                byte[] b)
      • xor

        public static byte[] xor(byte[] a,
                                 byte[] b)
      • not

        public static byte[] not(byte[] a)
      • hasAnyBitSet

        public static boolean hasAnyBitSet(byte[] map)
      • leftShift

        public static byte[] leftShift(byte[] map,
                                       int shiftBits)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.