Module de.carne

Class LongPreference


  • public class LongPreference
    extends Preference<@NonNull java.lang.Long>
    Long preference access.
    • Constructor Summary

      Constructors 
      Constructor Description
      LongPreference​(java.lang.String key, long defaultValue)
      Constructs a new LongPreference instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Long get​(java.util.prefs.Preferences prefs, java.lang.Long def)
      Gets this instance's preference value.
      long getLong​(java.util.prefs.Preferences prefs)
      Gets this instance's preference value.
      long getLong​(java.util.prefs.Preferences prefs, long def)
      Gets this instance's preference value.
      void put​(java.util.prefs.Preferences prefs, java.lang.Long value)
      Sets this instance's preference value.
      void putLong​(java.util.prefs.Preferences prefs, long value)
      Sets this instance's preference value.
      • Methods inherited from class java.lang.Object

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

      • LongPreference

        public LongPreference​(java.lang.String key,
                              long defaultValue)
        Constructs a new LongPreference instance.
        Parameters:
        key - the preference key to access.
        defaultValue - the default preference value to use.
    • Method Detail

      • get

        public java.lang.Long get​(java.util.prefs.Preferences prefs,
                                  java.lang.Long def)
        Description copied from class: Preference
        Gets this instance's preference value.
        Specified by:
        get in class Preference<@NonNull java.lang.Long>
        Parameters:
        prefs - the Preferences object to get the value from.
        def - the default preference value to return in case the preference is not defined.
        Returns:
        the retrieved preference value.
      • put

        public void put​(java.util.prefs.Preferences prefs,
                        java.lang.Long value)
        Description copied from class: Preference
        Sets this instance's preference value.
        Specified by:
        put in class Preference<@NonNull java.lang.Long>
        Parameters:
        prefs - the Preferences object to set the value into.
        value - the preference value to set.
      • getLong

        public long getLong​(java.util.prefs.Preferences prefs)
        Gets this instance's preference value.
        Parameters:
        prefs - the Preferences object to get the value from.
        Returns:
        the retrieved preference value.
      • getLong

        public long getLong​(java.util.prefs.Preferences prefs,
                            long def)
        Gets this instance's preference value.
        Parameters:
        prefs - the Preferences object to get the value from.
        def - the default preference value to return in case the preference is not defined.
        Returns:
        the retrieved preference value.
      • putLong

        public void putLong​(java.util.prefs.Preferences prefs,
                            long value)
        Sets this instance's preference value.
        Parameters:
        prefs - the Preferences object to set the value longo.
        value - the preference value to set.