Interface Preferences


public interface Preferences
Enables data to be stored and accessed from the Java preference store. Supports primitives.
  • Method Details

    • getString

      String getString(String key)
      String associated with the specified key. Returns null if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setString

      void setString(String key, String value)
      Associates the specified String with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key.
    • deleteString

      void deleteString(String key)
      Removes the mapping from the specified key to the String.
      Parameters:
      key - The key whose mapping is to be deleted.
    • stringKeys

      Set<String> stringKeys()
      Retrieve all keys currently mapped for String values.
      Returns:
      Set of keys.
    • getBoolean

      Boolean getBoolean(String key)
      Boolean associated with the specified key. Returns null if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setBoolean

      void setBoolean(String key, boolean value)
      Associates the specified boolean with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key. If this value is null then any value that is currently mapped to the specified key is removed.
    • deleteBoolean

      void deleteBoolean(String key)
      Removes the mapping from the specified key to the Boolean.
      Parameters:
      key - The key whose mapping is to be deleted.
    • booleanKeys

      Set<String> booleanKeys()
      Retrieve all keys currently mapped for Boolean values.
      Returns:
      Set of keys.
    • getByte

      Byte getByte(String key)
      Byte associated with the specified key. Returns null if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setByte

      void setByte(String key, byte value)
      Associates the specified byte with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key. If this value is null then any value that is currently mapped to the specified key is removed.
    • deleteByte

      void deleteByte(String key)
      Removes the mapping from the specified key to the Byte.
      Parameters:
      key - The key whose mapping is to be deleted.
    • byteKeys

      Set<String> byteKeys()
      Retrieve all keys currently mapped for Byte values.
      Returns:
      Set of keys.
    • getShort

      Short getShort(String key)
      Short associated with the specified key. Returns null if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setShort

      void setShort(String key, short value)
      Associates the specified short with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key. If this value is null then any value that is currently mapped to the specified key is removed.
    • deleteShort

      void deleteShort(String key)
      Removes the mapping from the specified key to the Short.
      Parameters:
      key - The key whose mapping is to be deleted.
    • shortKeys

      Set<String> shortKeys()
      Retrieve all keys currently mapped for Short values.
      Returns:
      Set of keys.
    • getInteger

      Integer getInteger(String key)
      Integer associated with the specified key. Returns null if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setInteger

      void setInteger(String key, int value)
      Associates the specified int with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key. If this value is null then any value that is currently mapped to the specified key is removed.
    • deleteInteger

      void deleteInteger(String key)
      Removes the mapping from the specified key to the Integer.
      Parameters:
      key - The key whose mapping is to be deleted.
    • integerKeys

      Set<String> integerKeys()
      Retrieve all keys currently mapped for Integer values.
      Returns:
      Set of keys.
    • getLong

      Long getLong(String key)
      Long associated with the specified key, or null} if this map contains no mapping for the key.
      Parameters:
      key - The key whose associated value is to be returned.
      Returns:
      The value associated with the specified key, or null if this map contains no mapping for the key.
    • setLong

      void setLong(String key, long value)
      Associates the specified long with the specified key in this map. This is an optional operation. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
      Parameters:
      key - The key with which the specified value is to be associated.
      value - The value to be associated with the specified key. If this value is null then any value currently mapped to the specified key is removed.
    • deleteLong

      void deleteLong(String key)
      Removes the mapping from the specified key to the Long.
      Parameters:
      key - The key whose mapping is to be deleted.
    • longKeys

      Set<String> longKeys()
      Retrieve all keys currently mapped for Long values.
      Returns:
      Set of keys.