Interface BitSet

  • All Known Implementing Classes:
    BuiltinBitSet

    public interface BitSet
    An interface of BitSet supports get/set/clear.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear​(int index)
      Sets the bit specified by the index to false.
      boolean get​(int index)  
      void set​(int index)
      Sets the bit at the specified index to true.
      int size()  
    • Method Detail

      • get

        boolean get​(int index)
        Parameters:
        index - the index of the bit to get
        Returns:
        the bit value of the specified index
      • set

        void set​(int index)
        Sets the bit at the specified index to true.
        Parameters:
        index - the index of the bit to be set
      • clear

        void clear​(int index)
        Sets the bit specified by the index to false.
        Parameters:
        index - the index of the bit to be cleared
      • size

        int size()
        Returns:
        the number of bits currently in this bit set