Class SubsetConfiguration.SubsetIterator
java.lang.Object
org.apache.commons.configuration2.SubsetConfiguration.SubsetIterator
- Enclosing class:
- SubsetConfiguration
A specialized iterator to be returned by the
getKeys()
methods. This implementation wraps an iterator from
the parent configuration. The keys returned by this iterator are correspondingly transformed.-
Field Summary
FieldsModifier and TypeFieldDescriptionStores the wrapped iterator. -
Constructor Summary
ConstructorsConstructorDescriptionSubsetIterator
(Iterator<String> it) Creates a new instance ofSubsetIterator
and initializes it with the parent iterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
parentIterator
Stores the wrapped iterator.
-
-
Constructor Details
-
SubsetIterator
Creates a new instance ofSubsetIterator
and initializes it with the parent iterator.- Parameters:
it
- the iterator of the parent configuration
-
-
Method Details
-
hasNext
public boolean hasNext()Checks whether there are more elements. Delegates to the parent iterator. -
next
Returns the next element in the iteration. This is the next key from the parent configuration, transformed to correspond to the point of view of this subset configuration. -
remove
public void remove()Removes the current element from the iteration. Delegates to the parent iterator.
-