public boolean removeMode(String mode){
  if (modes != null) {
    return modes.remove(mode);
  }
 else {
    return false;
  }
}

public boolean removeMode ( String mode ) { if ( modes != null ) { return modes . remove ( mode ) ; } else { return false ; } }
remove a specific mode from the list of modes .
