private synchronized void saveToSettings(){
  if (settings != null) {
    List<List> dataToSave=new ArrayList<>();
    for (    Hotkey hotkey : hotkeys) {
      dataToSave.add(hotkeyToList(hotkey));
    }
    settings.putList(SETTING_NAME,dataToSave);
  }
}

private synchronized void saveToSettings ( ) { if ( settings != null ) { List < List > dataToSave = new ArrayList < > ( ) ; for ( Hotkey hotkey : hotkeys ) { dataToSave . add ( hotkeyToList ( hotkey ) ) ; } settings . putList ( SETTING_NAME , dataToSave ) ; } }
turns all current hotkeys into something that can be written to the settings .
