The returned set will throw an {@code IllegalArgumentException}on an attempt to insert an element outside its range. @param fromElement low endpoint of the returned set @param fromInclusive {@code true} if the low endpointis to be included in the returned view @param toElement high endpoint of the returned set @param toInclusive {@code true} if the high endpointis to be included in the returned view @return a view of the portion of this set whose elements range from{@code fromElement}, inclusive, to {@code toElement}, exclusive @throws ClassCastException if {@code fromElement} and{@code toElement} cannot be compared to one another using thisset's comparator (or, if the set has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if {@code fromElement} or{@code toElement} cannot be compared to elements currently inthe set. @throws NullPointerException if {@code fromElement} or{@code toElement} is null and this set doesnot permit null elements @throws IllegalArgumentException if {@code fromElement} isgreater than {@code toElement}; or if this set itself has a restricted range, and {@code fromElement} or{@code toElement} lies outside the bounds of the range.
The returned set will throw an IllegalArgumentException on an attempt to insert an element outside its range. @param fromElement low endpoint (inclusive) of the returned set @param toElement high endpoint (exclusive) of the returned set @return a view of the portion of this set whose elements range fromfromElement, inclusive, to toElement, exclusive @throws ClassCastException if fromElement andtoElement cannot be compared to one another using this set's comparator (or, if the set has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if fromElement or toElement cannot be compared to elements currently in the set. @throws NullPointerException if fromElement ortoElement is null and this set does not permit null elements @throws IllegalArgumentException if fromElement isgreater than toElement; or if this set itself has a restricted range, and fromElement or toElement lies outside the bounds of the range
prefix.number = 1 prefix.string = Apache prefixed.foo = bar prefix = Jakartathe 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
Configuration
object containing all keys that start with the specified prefix. This implementation will return a HierarchicalConfiguration
object so that the structure of the keys will be saved. The nodes selected by the prefix (it is possible that multiple nodes are selected) are mapped to the root node of the returned configuration, i.e. their children and attributes will become children and attributes of the new root node. However a value of the root node is only set if exactly one of the selected nodes contain a value (if multiple nodes have a value, there is simply no way to decide how these values are merged together). Note that the returned Configuration
object is not connected to its source configuration: updates on the source configuration are not reflected in the subset and vice versa.
@param prefix the prefix of the keys for the subset
@return a new configuration object representing the selected subset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|