public boolean removeUserById ( int id ) { Iterator < User > it = users . iterator ( ) ; while ( it . hasNext ( ) ) if ( it . next ( ) . getId ( ) == id ) { it . remove ( ) ; return true ; } return false ; }
Removes the user with a given id .