|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.util.itr.AbstractIterator<T,U>
org.entityfs.util.itr.DepthLastIteratorImpl
public class DepthLastIteratorImpl
Standard implementation of DepthLastIterator
for EntityView
:s.
This class should have been named BreadthFirstIteratorImpl
...
EntityFS iterators are not thread safe. Don't use them concurrently from several threads without synchronizing access to them.
DepthFirstIteratorImpl
,
LocationAwareDepthLastIteratorImpl
Constructor Summary | |
---|---|
DepthLastIteratorImpl(EntityListable dv,
boolean returnThis)
Create a new depth-last (breadth-first) iterator. |
|
DepthLastIteratorImpl(EntityListable dv,
Filter<? super EntityView> filter,
boolean returnThis)
Create a new depth-last (breadth-first) iterator. |
Method Summary | |
---|---|
protected org.entityfs.util.itr.DepthLastIteratorContextImpl |
createChildIteratorContext(EntityView dv,
org.entityfs.util.itr.DepthLastIteratorContextImpl parentContext)
|
protected EntityView |
getObjectForRootDirectory(DirectoryView rootDirectory)
Get an object to return from the iterator for the root directory of the recursive iteration. |
protected boolean |
testAndSetNext()
|
Methods inherited from class org.entityfs.util.itr.AbstractIterator |
---|
getContextStack, getFilter, hasNext, next, remove, setNext, testAndSetNextChildEntity, testAndSetNextSubdirectory |
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 |
---|
hasNext, next, remove |
Constructor Detail |
---|
public DepthLastIteratorImpl(EntityListable dv, Filter<? super EntityView> filter, boolean returnThis)
dv
- The start directory for the iterator. If returnThis
is
true
, this argument must be a DirectoryView
(such as a Directory
.filter
- The filter that entities must pass to be returned from the
iterator. The iterator will not visit subdirectories that do not pass
this filter.returnThis
- Should the starting directory be returned as the first
entity from the iterator (if it passes the filter)?public DepthLastIteratorImpl(EntityListable dv, boolean returnThis)
dv
- The start directory for the iterator. If returnThis
is
true
, this argument must be a DirectoryView
(such as a Directory
.returnThis
- Should the starting directory be returned as the first
entity from the iterator?Method Detail |
---|
protected org.entityfs.util.itr.DepthLastIteratorContextImpl createChildIteratorContext(EntityView dv, org.entityfs.util.itr.DepthLastIteratorContextImpl parentContext)
createChildIteratorContext
in class AbstractIterator<org.entityfs.util.itr.DepthLastIteratorContextImpl,EntityView>
protected EntityView getObjectForRootDirectory(DirectoryView rootDirectory)
DepthLastIteratorContext.testAndClearShouldReturnThis()
returns
true
for the current context.
rootDirectory
- The root directory of the iteration.protected final boolean testAndSetNext()
testAndSetNext
in class AbstractIterator<T extends org.entityfs.util.itr.DepthLastIteratorContext<U>,U>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |