Interface Storage



  • public interface Storage
    A minimal interface for an object that stores key/value pairs. You can create a Storage object that maps to a Hashtable, to particular Preferences, etc.
    • Method Summary

      Modifier and Type Method and Description
      String get(Object key)
      Retrieves a key/value pair.
      boolean put(Object key, String value)
      Stores a key/value pair.
    • Method Detail

      • put

        boolean put(Object key,
                    String value)
        Stores a key/value pair.
        Parameters:
        key - the key to define
        value - the value to store
        Returns:
        true if this call changed the existing value of key
      • get

        String get(Object key)
        Retrieves a key/value pair.
        Parameters:
        key - the key to consult
        Returns:
        the String associated with that key