Code example for BitSet

Methods: clear, length

0
        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 { 
            return Integer.MIN_VALUE;
        } 
    } 
 
    public int put(boolean key, int value) {