public int first ( ) { for ( int ii = 0 ; ii < array . length ; ii ++ ) { if ( array [ ii ] != 0 ) { for ( int jj = ii * 8 ; jj < bits ; jj ++ ) { if ( isSet ( jj ) ) { return jj ; } } } } return - 1 ; }
returns the first set bits index