Return a decorator Configuration containing every key from the current Configuration that starts with the specified prefix. The prefix is removed from the keys in the subset. For example, if the configuration contains the following properties:
prefix.number = 1 prefix.string = Apache prefixed.foo = bar prefix = Jakarta
the Configuration returned by
subset("prefix")
will contain the properties:
number = 1 string = Apache = Jakarta
(The key for the value "Jakarta" is an empty string)
Since the subset is a decorator and not a modified copy of the initial Configuration, any change made to the subset is available to the Configuration, and reciprocally.
@param prefix The prefix used to select the properties.
@return a subset configuration
@see SubsetConfiguration