code: public void addInstrument(Instrument instrument, String id) {
      if (instrument == null || id == null) {
        throw new IllegalArgumentException("Instruemnt and ID must be non-null values.");
      }
      if (instruments.size() == 0) {
        defaultInstrumentID = id;
  
      } else if (instruments.size() > 0 && !isDefaultExplicitlySet) {
        unsetDefaultInstrument();
      }
      instruments.put(id, instrument);
    }
docs: If only one instrument is added, it will be set as the default instrument, all the scans, that
  you add to the ScanCollection will implicitly refer to this one instrument.
  
  @param id some identifier for mapping instruments. Instrumnt list is normally stored at the
  beginning of the run file, so it's a mapping from this list, to instrument ID specified for
  each spectrumRef.