org.eclipse.emf.emfstore.internal.client.ui.util
Class EMFStorePreferenceHelper

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.client.ui.util.EMFStorePreferenceHelper

public final class EMFStorePreferenceHelper
extends Object

Simplifies setting and getting of preference key/value pairs.

Author:
emueller

Method Summary
static String getPreference(String key, String defaultValue)
          Retrieves a preference value for a specific key.
static void setPreference(String key, String value)
          Set the preference value for a specific key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPreference

public static String getPreference(String key,
                                   String defaultValue)
Retrieves a preference value for a specific key.

Parameters:
key - the key used to identify the preference
defaultValue - the value that should be returned in case the preference could not be found
Returns:
the value of the preference if it exists, otherwise the defaultValue

setPreference

public static void setPreference(String key,
                                 String value)
Set the preference value for a specific key. Key and value must not equal null.

Parameters:
key - the key that is used to identify the given value
value - the value of the preference to be set


Copyright © 2015. All Rights Reserved.