com.sun.jini.outrigger.snaplogstore
Class LogInputFile.LogInputFileIterator
java.lang.Object
com.sun.jini.outrigger.snaplogstore.LogInputFile.LogInputFileIterator
- All Implemented Interfaces:
- Iterator
- Enclosing class:
- LogInputFile
private static class LogInputFile.LogInputFileIterator
- extends Object
- implements Iterator
The implementation of Iterator
returned by
LogInputStream.logs
. The next
method
occasionally returns null
.
- See Also:
next()
Method Summary |
boolean |
hasNext()
|
Object |
next()
Return the next File object, or
null . |
void |
remove()
Remove the File object returned by the iterator
from the list. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
baseLogFile
private LogFile baseLogFile
fileList
private Iterator fileList
LogInputFile.LogInputFileIterator
LogInputFile.LogInputFileIterator(Collection files,
LogFile baseLogFile)
- Create a new
LogInputFileIterator
object
for the given list.
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator
next
public Object next()
- Return the next
File
object, or
null
. You will get null
when the
file existed at the time of listing, but no longer exists
when the iterator gets to it. For example, if a process is
consuming all completed logs, the listing might find a log,
but that process may have consumed and removed it by the
time you invoke next
, so you will get a
null
.
- Specified by:
next
in interface Iterator
remove
public void remove()
- Remove the
File
object returned by the iterator
from the list. This does not remove the file
itself.
- Specified by:
remove
in interface Iterator
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.