/**@class android.content.SharedPreferences
Interface for accessing and modifying preference data returned by {@link android.content.Context#getSharedPreferences}. For any particular set of preferences,
there is a single instance of this class that all clients share.
Modifications to the preferences must go through an {@link android.content.SharedPreferences.Editor} object
to ensure the preference values remain in a consistent state and control
when they are committed to storage. Objects that are returned from the
various <code>get</code> methods must be treated as immutable by the application.
<p>Note: This class provides strong consistency guarantees. It is using expensive operations
which might slow down an app. Frequently changing properties or properties where loss can be
tolerated should use other mechanisms. For more details read the comments on
{@link android.content.SharedPreferences.Editor#commit()} and {@link android.content.SharedPreferences.Editor#apply()}.
<p><em>Note: This class does not support use across multiple processes.</em>
<div class="special reference">
<h3>Developer Guides</h3>
<p>For more information about using SharedPreferences, read the
<a href="{@docRoot}guide/topics/data/data-storage.html#pref">Data Storage</a>
developer guide.</p></div>
@see Context#getSharedPreferences
*/
var SharedPreferences = {
/**Retrieve all values from the preferences.
<p>Note that you <em>must not</em> modify the collection returned
by this method, or alter any of its contents. The consistency of your
stored data is not guaranteed if you do.
@return {Object {java.util.Map}} Returns a map containing a list of pairs key/value representing
the preferences.
@throws NullPointerException
*/
getAll : function( ) {},
/**Retrieve a String value from the preferences.
@param {String} key The name of the preference to retrieve.
@param {String} defValue Value to return if this preference does not exist.
@return {String} Returns the preference value if it exists, or defValue. Throws
ClassCastException if there is a preference with this name that is not
a String.
@throws ClassCastException
*/
getString : function( ) {},
/**Retrieve a set of String values from the preferences.
<p>Note that you <em>must not</em> modify the set instance returned
by this call. The consistency of the stored data is not guaranteed
if you do, nor is your ability to modify the instance at all.
@param {String} key The name of the preference to retrieve.
@param {Object {java.util.Set}} defValues Values to return if this preference does not exist.
@return {Object {java.util.Set}} Returns the preference values if they exist, or defValues.
Throws ClassCastException if there is a preference with this name
that is not a Set.
@throws ClassCastException
*/
getStringSet : function( ) {},
/**Retrieve an int value from the preferences.
@param {String} key The name of the preference to retrieve.
@param {Number} defValue Value to return if this preference does not exist.
@return {Number} Returns the preference value if it exists, or defValue. Throws
ClassCastException if there is a preference with this name that is not
an int.
@throws ClassCastException
*/
getInt : function( ) {},
/**Retrieve a long value from the preferences.
@param {String} key The name of the preference to retrieve.
@param {Number} defValue Value to return if this preference does not exist.
@return {Number} Returns the preference value if it exists, or defValue. Throws
ClassCastException if there is a preference with this name that is not
a long.
@throws ClassCastException
*/
getLong : function( ) {},
/**Retrieve a float value from the preferences.
@param {String} key The name of the preference to retrieve.
@param {Number} defValue Value to return if this preference does not exist.
@return {Number} Returns the preference value if it exists, or defValue. Throws
ClassCastException if there is a preference with this name that is not
a float.
@throws ClassCastException
*/
getFloat : function( ) {},
/**Retrieve a boolean value from the preferences.
@param {String} key The name of the preference to retrieve.
@param {Boolean} defValue Value to return if this preference does not exist.
@return {Boolean} Returns the preference value if it exists, or defValue. Throws
ClassCastException if there is a preference with this name that is not
a boolean.
@throws ClassCastException
*/
getBoolean : function( ) {},
/**Checks whether the preferences contains a preference.
@param {String} key The name of the preference to check.
@return {Boolean} Returns true if the preference exists in the preferences,
otherwise false.
*/
contains : function( ) {},
/**Create a new Editor for these preferences, through which you can make
modifications to the data in the preferences and atomically commit those
changes back to the SharedPreferences object.
<p>Note that you <em>must</em> call {@link android.content.SharedPreferences.Editor#commit} to have any
changes you perform in the Editor actually show up in the
SharedPreferences.
@return {Object {android.content.SharedPreferences.Editor}} Returns a new instance of the {@link Editor} interface, allowing
you to modify the values in this SharedPreferences object.
*/
edit : function( ) {},
/**Registers a callback to be invoked when a change happens to a preference.
<p class="caution"><strong>Caution:</strong> The preference manager does
not currently store a strong reference to the listener. You must store a
strong reference to the listener, or it will be susceptible to garbage
collection. We recommend you keep a reference to the listener in the
instance data of an object that will exist as long as you need the
listener.</p>
@param {Object {SharedPreferences.OnSharedPreferenceChangeListener}} listener The callback that will run.
@see #unregisterOnSharedPreferenceChangeListener
*/
registerOnSharedPreferenceChangeListener : function( ) {},
/**Unregisters a previous callback.
@param {Object {SharedPreferences.OnSharedPreferenceChangeListener}} listener The callback that should be unregistered.
@see #registerOnSharedPreferenceChangeListener
*/
unregisterOnSharedPreferenceChangeListener : function( ) {},
};