Here you can find the source of putBooleanDontOverwrite(Preferences prefs, String key, boolean value)
private static boolean putBooleanDontOverwrite(Preferences prefs, String key, boolean value)
//package com.java2s; /*/*w ww .j a v a 2 s .c o m*/ * PrefsUtil.java * Eisenkraut * * Copyright (c) 2004-2015 Hanns Holger Rutz. All rights reserved. * * This software is published under the GNU General Public License v3+ * * * For further information, please contact Hanns Holger Rutz at * contact@sciss.de * * * Changelog: * 25-Jan-05 created from de.sciss.meloncillo.util.PrefsUtil * 13-May-05 updated from Meloncillo * 22-Jul-05 suggests 57109 as default scsynth port ; no longer * uses 'Built-in Audio' device on Mac (sc will use * default system output instead) ; TEMPDIR refers to IOUtil */ import java.util.prefs.Preferences; public class Main { private static boolean putBooleanDontOverwrite(Preferences prefs, String key, boolean value) { boolean overwrite = prefs.get(key, null) == null; if (overwrite) { prefs.putBoolean(key, value); } return overwrite; } }