Java BitSet toString(BitSet bs)

Here you can find the source of toString(BitSet bs)

Description

to String

License

Apache License

Declaration

public static String toString(BitSet bs) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.BitSet;

public class Main {
    public static String toString(BitSet bs) {
        int len = bs.length();
        StringBuffer buf = new StringBuffer(len);
        for (int i = 0; i < len; i++)
            buf.append(bs.get(i) ? '1' : '0');
        return buf.toString();
    }/*from  w  w  w.j a v  a 2s .c o  m*/
}

Related

  1. toggleInPlace(BitSet a, BitSet b)
  2. toInt(BitSet bitSet)
  3. toIntArray(final BitSet bits, final int size)
  4. toInteger(final BitSet bits)
  5. toLong(final BitSet value)
  6. translateBitSetToProjIndx(BitSet projBitSet)
  7. unionAdd(BitSet newClique, int nNodes, LinkedList cliques)
  8. unpackInt(BitSet bs, int offset, int noOfBits)
  9. unsignedIntToLittleEndianBitSet(int i)