Here you can find the source of bitSetOfIndexes(int... indexes)
public static BitSet bitSetOfIndexes(int... indexes)
//package com.java2s; import java.util.BitSet; public class Main { public static BitSet bitSetOfIndexes(int... indexes) { BitSet bitSet = new BitSet(); for (int index : indexes) { bitSet.set(index);/*from ww w. j a v a2 s.com*/ } return bitSet; } }