Package jakarta.nosql
Interface Settings
- 
 public interface SettingsThe interface represents the settings used in a configuration.- See Also:
- of(Map[])
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceSettings.SettingsBuilderThe Settings builderSettingsstatic interfaceSettings.SettingsBuilderProviderA provider ofSettings.SettingsBuilder
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Settings.SettingsBuilderbuilder()Creates aSettings.SettingsBuildervoidcomputeIfAbsent(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.voidcomputeIfPresent(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.booleancontainsKey(String key)Returns true if this map contains a mapping for the specified key.Set<Map.Entry<String,Object>>entrySet()Returns a Set view of the mappings contained in this map.voidforEach(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.Optional<Object>get(String key)Returns the value to which the specified key is mapped, orOptional.empty()if this map contains no mapping for the key.<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.Optional<Object>get(Collection<String> keys)Returns the value to which the specified from one of these keys is mapped, orOptional.empty()if this map contains no mapping for the key.ObjectgetOrDefault(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.booleanisEmpty()Set<String>keySet()Returns a Set view of the keys contained in this map.static Settingsof(Map<String,Object> settings)Creates a settings from mapsstatic Settingsof(Map<String,Object>... settings)Creates a settings from mapsList<Object>prefix(String prefix)Finds all keys that have the parameter as a prefixList<Object>prefix(Collection<String> prefixes)Finds all keys that have the parameter as a prefixintsize()Map<String,Object>toMap()Converts the settings toMap
 
- 
- 
- 
Method Detail- 
keySetSet<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
 
 - 
getOptional<Object> get(String key) Returns the value to which the specified key is mapped, orOptional.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
 
 - 
getOptional<Object> get(Collection<String> keys) Returns the value to which the specified from one of these keys is mapped, orOptional.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
 
 - 
prefixList<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
 
 - 
prefixList<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
 
 - 
getOrDefaultObject 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
 
 - 
isEmptyboolean isEmpty() - Returns:
- Returns true if this map contains no key-value mappings.
 
 - 
sizeint size() - Returns:
- Returns the number of key-value mappings in this map.
 
 - 
containsKeyboolean 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
 
 - 
entrySetSet<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
 
 - 
forEachvoid 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
 
 - 
computeIfPresentvoid 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
 
 - 
computeIfAbsentvoid 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
 
 - 
builderstatic Settings.SettingsBuilder builder() Creates aSettings.SettingsBuilder- Returns:
- a Settings.SettingsBuilderinstance
 
 - 
ofstatic Settings of(Map<String,Object> settings) Creates a settings from maps- Parameters:
- settings- the setting
- Returns:
- the new Settingsinstance
- Throws:
- NullPointerException- when either the parameter is null or there key or value null
 
 - 
of@SafeVarargs static Settings of(Map<String,Object>... settings) Creates a settings from maps- Parameters:
- settings- the setting
- Returns:
- the new Settingsinstance
- Throws:
- NullPointerException- when either the parameter is null or there key or value null
 
 
- 
 
-