ca.beq.util.win32.registry
Class KeyIterator
java.lang.Object
|
+--ca.beq.util.win32.registry.KeyIterator
- All Implemented Interfaces:
- Iterator
- public class KeyIterator
- extends Object
- implements Iterator
KeyIterator provides methods to iterate through the subkeys of
a particular registry key.
- Version:
- 1.0
- Author:
- BEQ Technologies Inc.
- See Also:
RegistryKey,
RootKey,
Iterator
|
Constructor Summary |
KeyIterator(RegistryKey key)
Constructs a new KeyIterator to enumerate subkeys from the
specified RegistryKey. |
|
Method Summary |
boolean |
hasNext()
Returns true if the iteration contains more
RegistryKey elements. |
Object |
next()
Returns the next RegistryKey element in the iteration. |
void |
remove()
The optional remove operation is not supported by this
Iterator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyIterator
public KeyIterator(RegistryKey key)
- Constructs a new
KeyIterator to enumerate subkeys from the
specified RegistryKey.
- Parameters:
key - The registry key from which to enumerate subkeys.
hasNext
public boolean hasNext()
- Returns
true if the iteration contains more
RegistryKey elements. (In other words, returns
true if next would return a
RegistryKey element rather than throwing an exception).
- Specified by:
hasNext in interface Iterator
- Returns:
true if the iterator has more
RegistryKey elements.
next
public Object next()
- Returns the next
RegistryKey element in the iteration.
- Specified by:
next in interface Iterator
- Returns:
- the next
RegistryKey element in the iteration. - Throws:
NoSuchElementException - if the iteration contains no more
RegistryKey elements.
remove
public void remove()
- The optional
remove operation is not supported by this
Iterator.
- Specified by:
remove in interface Iterator
- Throws:
java.lang.UnsupportedOperationException - if the remove operation
is not supported by this Iterator.