Here you can find the source of shiftLeft(BitSet bs, int n)
public static void shiftLeft(BitSet bs, int n)
//package com.java2s; //License from project: Open Source License import java.util.BitSet; public class Main { public static void shiftLeft(BitSet bs, int n) { for (int i = bs.length() - 1; i >= 0; i = bs.previousSetBit(i - 1)) { bs.clear(i);/* w w w .j a v a2 s . c om*/ bs.set(i + 1); } } }