Package jakarta.nosql

Interface Settings


  • public interface Settings
    The interface represents the settings used in a configuration.
    See Also:
    of(Map[])
    • Method Detail

      • keySet

        Set<String> keySet()
        Returns a Set view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation), the results of the iteration are undefined. The set supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
        Returns:
        a set view of the keys contained in this map
      • get

        Optional<Object> get​(String key)
        Returns the value to which the specified key is mapped, or Optional.empty() if this map contains no mapping for the key.
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or Optional.empty() if this map contains no mapping for the key
        Throws:
        NullPointerException - when key is null
      • get

        Optional<Object> get​(Collection<String> keys)
        Returns the value to which the specified from one of these keys is mapped, or Optional.empty() if this map contains no mapping for the key.
        Parameters:
        keys - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or Optional.empty() if this map contains no mapping for the key
        Throws:
        NullPointerException - when keys is null
      • prefix

        List<Object> prefix​(String prefix)
        Finds all keys that have the parameter as a prefix
        Parameters:
        prefix - the prefix
        Returns:
        all the keys from prefix
        Throws:
        NullPointerException - when prefix is null
      • prefix

        List<Object> prefix​(Collection<String> prefixes)
        Finds all keys that have the parameter as a prefix
        Parameters:
        prefixes - the list of prefixes
        Returns:
        all the keys from prefix
        Throws:
        NullPointerException - when prefixes is null
      • get

        <T> Optional<T> get​(String key,
                            Class<T> type)
        Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Type Parameters:
        T - the type value
        Parameters:
        key - the key whose associated value is to be returned
        type - the type be used as Value.get(Class)
        Returns:
        the value to which the specified key is mapped, or Optional.empty() if this map contains no mapping for the key
        Throws:
        NullPointerException - when there are null parameters
      • getOrDefault

        Object getOrDefault​(String key,
                            Object defaultValue)
        Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key.
        Parameters:
        key - the key whose associated value is to be returned
        defaultValue - the default mapping of the key
        Returns:
        the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key
      • isEmpty

        boolean isEmpty()
        Returns:
        Returns true if this map contains no key-value mappings.
      • size

        int size()
        Returns:
        Returns the number of key-value mappings in this map.
      • containsKey

        boolean containsKey​(String key)
        Returns true if this map contains a mapping for the specified key.
        Parameters:
        key - key whose presence in this map is to be tested
        Returns:
        true if this map contains a mapping for the specified key
        Throws:
        NullPointerException - when key is null
      • entrySet

        Set<Map.Entry<String,​Object>> entrySet()
        Returns a Set view of the mappings contained in this map.
        Returns:
        a set view of the mappings contained in this map
      • forEach

        void forEach​(BiConsumer<String,​Object> action)
        Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.
        Parameters:
        action - the action
        Throws:
        NullPointerException - when action is null
      • computeIfPresent

        void computeIfPresent​(String key,
                              BiConsumer<String,​Object> action)
        If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.
        Parameters:
        key - the key
        action - the action
        Throws:
        NullPointerException - when there is null parameter
      • computeIfAbsent

        void computeIfAbsent​(String key,
                             Function<String,​Object> action)
        If the specified key is not already associated with a value (or is mapped to null), attempts to compute its value using the given mapping function and enters it into this map unless null.
        Parameters:
        key - the key
        action - the action
        Throws:
        NullPointerException - when there is null parameter