Code example for BitSet

Methods: nextSetBit

0
        } 
    } 
 
    public int get(boolean key) {
        BitSet set = key ? m_true : m_false;
        return set.nextSetBit(0);
    } 
 
    public int remove(boolean key) {
        BitSet set = key ? m_true : m_false;
        int idx = set.length()-1;
        set.clear(idx);
        return idx;
    } 
 
    public int remove(boolean key, int value) {
        BitSet set = key ? m_true : m_false;
        if ( set.get(value) ) {
            set.clear(value);
            return value;
        } else {