Class GroovyInternalStore.EphemeralKeyValueStore

java.lang.Object
de.uplanet.lucy.server.store.scripting.groovy.GroovyInternalStore.EphemeralKeyValueStore
Enclosing class:
GroovyInternalStore

public final class GroovyInternalStore.EphemeralKeyValueStore extends Object
Access the internal ephemeral key-value store.
  • Method Details

    • containsKey

      public boolean containsKey(String p_strKey)
      Check if the store contains a mapping for the given key.

      Note that there is no guaranty that subsequent calls put(String, Object) or remove(String) will retrieve the associated value.

      Parameters:
      p_strKey - The key.
      Returns:
      true if the store contains a mapping for the given key, or false otherwise.
      Throws:
      IllegalArgumentException - If null is passed as key.
    • contains

      public boolean contains(Object p_key)
      Check if the store contains a mapping for the given key.

      Note that there is no guaranty that subsequent calls put(String, Object) or remove(String) will retrieve the associated value.

      This method is basically the same as containsKey(String) but also allows passing null values and other types than Strings as keys. In the latter case values of type CharSequence will be converted to String before the actual lookup.

      Parameters:
      p_key - The key.
      Returns:
      true if the store contains a mapping for the given key, or false otherwise.
    • put

      public Object put(String p_strKey, Object p_value)
      Map the specified key to the given value.
      Parameters:
      p_strKey - The key (must not be null).
      p_value - The value (must not be null).
      Returns:
      The previous value associated with the key, or null if there was no mapping for the key.
    • remove

      public Object remove(String p_strKey)
      Remove the specified mapping.
      Parameters:
      p_strKey - The key (must not be null).
      Returns:
      The value associated with the key, or null if there is no mapping for the key.
    • isCase

      public boolean isCase(Object p_value)
      Method for supporting the membership (in) operator.
      Parameters:
      p_value - The switch value.
      Returns:
      true if the switch value is deemed to be equal to the case value, or false otherwise.