Class BitStringWithNamedBits

    • Constructor Detail

      • BitStringWithNamedBits

        public BitStringWithNamedBits()
        Constructs a new BitStringWithNamedBits that has no bits set.
      • BitStringWithNamedBits

        public BitStringWithNamedBits​(int nbits)
        Constructs a new BitStringWithNamedBits that has no bits set, initialised to accommodate the given number of bits.
        Parameters:
        nbits - initial number of bits
    • Method Detail

      • toString

        public String toString()
        Returns a string describing this set of bits, using names for bits that have names and otherwise using numbers. For example, "{nameForFirstBit,nameForThirdBit,4}" could be the string for a set of four bits in which the second bit is currently not set and the fourth bit has no name. The bits are described in order.
        Overrides:
        toString in class BitString
        Returns:
        String that describes this object
      • getNamedBits

        public abstract BitStringWithNamedBits.NamedBit[] getNamedBits()
        Gets the names of all bits of this type (not just the bits set in this value).
        Returns:
        array of NamedBit