void removeEntity(final IEntity entity){
  final EntityView<IEntity> view=entities.remove(entity);
  if (view != null) {
    removeEntityView(view);
  }
}

void removeEntity ( final IEntity entity ) { final EntityView < IEntity > view = entities . remove ( entity ) ; if ( view != null ) { removeEntityView ( view ) ; } }
remove an entity . must be called only from the game loop thread .
