boolean removeEq ( Object o ) { for ( int i = 0 ; i < size ; i ++ ) { if ( o == queue [ i ] ) { removeAt ( i ) ; return true ; } } return false ; }
Version of remove using reference equality not equals . Needed by iterator . remove .