Class PreferenceHelper


  • public final class PreferenceHelper
    extends java.lang.Object
    The preference helper aids storing {key, value} pairs.
    Author:
    pfeifferc
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPreference​(java.lang.String key, java.lang.String defaultValue)
      Get a preference value for a specific key.
      static void setPreference​(java.lang.String key, java.lang.String value)
      Set the preference value for a specific key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPreference

        public static java.lang.String getPreference​(java.lang.String key,
                                                     java.lang.String defaultValue)
        Get a preference value for a specific key.
        Parameters:
        key - the
        defaultValue - the
        Returns:
        the value if it exists, otherwise the defaultValue
      • setPreference

        public static void setPreference​(java.lang.String key,
                                         java.lang.String value)
        Set the preference value for a specific key. Key and value must not equal null.
        Parameters:
        key - the
        value - the