code: public SwingTerminalFrame setAutoCloseTrigger(TerminalEmulatorAutoCloseTrigger autoCloseTrigger) {
          this.autoCloseTriggers.clear();
          if(autoCloseTrigger != null) {
              this.autoCloseTriggers.add(autoCloseTrigger);
          }
          return this;
      }
docs: Sets the auto-close trigger to use on this terminal. This will reset any previous triggers. If called with
  {@code null}, all triggers are cleared.
  @param autoCloseTrigger Auto-close trigger to use on this terminal, or {@code null} to clear all existing triggers
  @return Itself