Class StoreAndRetrieve

java.lang.Object
fr.sandro642.github.misc.StoreAndRetrieve

public class StoreAndRetrieve extends Object
StoreAndRetrieve is a utility class for storing and retrieving key-value pairs. It provides methods to add, get, remove, and check for keys in a map. * This class is used to manage configuration values such as the base URL of an API and file locations.
  • Field Details

  • Constructor Details

    • StoreAndRetrieve

      public StoreAndRetrieve()
  • Method Details

    • put

      public void put(String key, Object value)
      Add a key-value pair to the store.
      Parameters:
      key - is the key under which the value will be stored.
      value - is the value to be stored under the specified key.
    • get

      public Object get(String key)
      Retrieve a value associated with the specified key.
      Parameters:
      key - is the key for which the value will be retrieved.
      Returns:
      the value associated with the specified key, or null if the key does not exist.
    • remove

      public void remove(String key)
      Remove a key-value pair from the store.
      Parameters:
      key - is the key of the entry to be removed.
    • containsKey

      public boolean containsKey(String key)
      Check if the store contains a specific key.
      Parameters:
      key - is the key to check for existence in the store.
      Returns:
      true if the key exists, false otherwise.