Adds two or more elements to this collection and returns a new collection.
Adds two or more elements to this collection and returns a new collection.
the first element to add.
the second element to add.
the remaining elements to add.
A new map with the new bindings added to this map.
Gets a new configuration based on this one with another value added or replaced.
Gets a new configuration based on this one with another value added or replaced.
Adds a number of elements provided by a traversable object and returns a new collection with the added elements.
Adds a number of elements provided by a traversable object and returns a new collection with the added elements.
the traversable object consisting of key-value pairs.
a new immutable map with the bindings of this map and those from xs
.
Gets a new configuration based on this one with a value removed.
Gets a new configuration based on this one with a value removed.
Gets a new configuration based on this one with removal of all the keys given in another collection.
Gets a new configuration based on this one with removal of all the keys given in another collection.
'Overrides': a right-associative form of overriddenBy
.
'Overrides': a right-associative form of overriddenBy
.
the source for the new instance
the new instance composed from other
with this
as fallback.
'Overrides': a right-associative form of overriddenBy
.
'Overrides': a right-associative form of overriddenBy
.
the source for the new instance
the new instance composed from other
with this
as fallback.
'Overrides': a right-associative form of overriddenBy
.
'Overrides': a right-associative form of overriddenBy
.
the source for the new instance
the new instance composed from other
with this
as fallback.
'Overrides': a right-associative form of overriddenBy
.
'Overrides': a right-associative form of overriddenBy
.
the source for the new instance. Note that this could be a Config
.
the new instance composed from other
with this
as fallback.
Retrieves the value which is associated with the given key.
Retrieves the value which is associated with the given key.
If the value is surrounded by double-quotes, they are removed.
If the key is missing, a NoSuchElementException
is thrown.
Gets the empty map of the same type as this map.
Gets the empty map of the same type as this map.
Filters the subset of entries ending with a given suffix, returning a new Config instance.
Filters the subset of entries ending with a given suffix, returning a new Config instance. This allows hierarchical configurations to be loaded from a single file (or multiple files, if using the overriding feature in the constructors).
The keys in the resulting Config are shortened by removing the suffix from them. For example, if the suffix ".yyy" is applied the entry "xxx.yyy=1", the resulting Config will contain "xxx=1". The values are unchanged from the source data.
Retrieves the optional value which is associated with the given key, or None if absent.
Retrieves the optional value which is associated with the given key, or None if absent. If the value is surrounded by double-quotes, they are removed.
Gets a value containing a comma-separated list and returns the list.
Gets a value containing a comma-separated list and returns the list. If the value is empty, the result is Nil. If the value is not empty but has no commas, the result list has one item. Double-quote marks may be used to delimit lists that themselves contain commas as part of their string.
If the key is missing, a NoSuchElementException
is thrown.
Tests whether the map is empty.
Tests whether the map is empty.
Gets an iterator over the entries.
Gets an iterator over the entries. Any values that happen to be surrounded by double-quotes are returned as-is, including the quote marks.
Collects all keys of this map in a set.
Collects all keys of this map in a set.
(Changed in version 2.8.0) keys
returns Iterable[A]
rather than Iterator[A]
.
Constructs a new instance based on source information, using this
as the fallback.
Constructs a new instance based on source information, using this
as the fallback.
the source for the new instance
the new instance constructed from file
with this
as fallback.
Constructs a new instance based on source information, using this
as the fallback.
Constructs a new instance based on source information, using this
as the fallback.
the source for the new instance
the new instance constructed from source
with this
as fallback.
Constructs a new instance based on source information, using this
as the fallback.
Constructs a new instance based on source information, using this
as the fallback.
the source for the new instance
the new instance constructed from parser
with this
as fallback.
Constructs a new instance based on source information, using this
as the fallback.
Constructs a new instance based on source information, using this
as the fallback.
the source for the new instance. Note that this could be a Config
.
the new instance composed from other
with this
as fallback.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
If 'ini' file sections are used, this filters the subset of entries in a given section, returning a new Config instance.
If 'ini' file sections are used, this filters the subset of entries in a given section, returning a new Config instance. This is the same as filtering those entries starting with a given prefix, except that an implied '.' joins the section name to its contained keys.
The keys in the resulting Config are shortened by removing the implied prefix from them, but in the typical case of an 'ini' file, this actually means the keys will be exactly as written. For example, if a section is "[xxx]" and it contains entry "yyy=1", the resulting Config will contain "yyy=1". (Note that the parent Config would contain "xxx.yyy=1" in this case.) The values are unchanged from the source data.
the resolved source data.
the resolved source data.
The size of this map.
The size of this map.
Filters the subset of entries starting with a given prefix, returning a new Config instance.
Filters the subset of entries starting with a given prefix, returning a new Config instance. This allows hierarchical configurations to be loaded from a single file (or multiple files, if using the overriding feature in the constructors).
The keys in the resulting Config are shortened by removing the prefix from them. For example, if the prefix "xxx." is applied the entry "xxx.yyy=1", the resulting Config will contain "yyy=1". The values are unchanged from the source data.
Copies some or all of this config into a specified javabean.
Copies some or all of this config into a specified javabean. This operates via reflection to use its setters to populate values using the setter names to indicate the keys into this config instance.
The bean may itself contain nested beans that will be configured recursively provided the configuration contains the necessary subsections (see {#section(String)} and {#startingWith(String)}).
the existing javabean
the modified javabean
if the type of the data cannot be coerced to match the type of the setter.
NoSuchElementExceptionif any key is not found, i.e. the bean properties are not a proper subset of the available config keys.
ReflectiveOperationExceptionif it was not possible to modify the bean by reflection for some reason
Copies some or all of this config into a new instance of a specified javabean class.
Copies some or all of this config into a new instance of a specified javabean class. This operates via reflection to create a new bean instance. If the bean has setters, it uses them to populate values using the setter names to indicate the keys into this config instance. Otherwise, if the bean has a constructor with a suitable number of parameters, it creates a new instance using that constructor, with the order of the constructor parameters being determined by the declaration order of the bean's fields.
The bean may itself contain nested beans that will be configured recursively provided the configuration contains the necessary subsections (see {#section(String)} and {#startingWith(String)}).
the required javabean class
the new javabean
if the type of the data cannot be coerced to match the type of the setter / constructor parameter.
NoSuchElementExceptionif any key is not found, i.e. the bean properties are not a proper subset of the available config keys.
ReflectiveOperationExceptionif it was not possible to create or modify the bean by reflection for some reason
Obtains a copy of this instance in the form of a Properties object.
Depicts the contents of this configuration.
Depicts the contents of this configuration.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Retrieves the value which is associated with the given key, returning it as a new uk.co.bigbeeconsultants.bconfig.Value.
Retrieves the value which is associated with the given key, returning it as a new
uk.co.bigbeeconsultants.bconfig.Value.
If the value is surrounded by double-quotes, they are removed.
If the key is missing, a NoSuchElementException
is thrown.
(Changed in version 2.8.0) values
returns Iterable[B]
rather than Iterator[B]
.
Provides checking that the configuration keys are exactly as expected.
Provides checking that the configuration keys are exactly as expected.
the specification of what's required
a diagnostic name used in any error message, e.g. the name of the file (default is "Config")
this
(Since version v1.5.0) Mis-spelt
(Since version v1.5.0) Mis-spelt
(Since version v1.5.0) Mis-spelt
Provides configuration data in the form of a Scala map. Normally, the class constructor shouldn't be used; instead, the object 'apply' factory methods provide all the necessary parsing and string interpolation behaviour.