cc.redberry.core.tensor.iterator
Class FromParentToChildIterator
- java.lang.Object
-
- cc.redberry.core.tensor.iterator.FromParentToChildIterator
-
- All Implemented Interfaces:
- TreeIterator
public final class FromParentToChildIterator extends java.lang.ObjectWrapper for TreeTraverseIterator. Return onlyLeavingelements. Traverse into.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description FromParentToChildIterator(Tensor tensor)FromParentToChildIterator(Tensor tensor, TraverseGuide guide)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intdepth()Returns the current depth in the tree.Tensornext()Returns the next tensor in tree or null if iteration is finishedTensorresult()Returns the result after iteration finished (or stopped).voidset(Tensor tensor)Set current tensor in tree.
-
-
-
Constructor Detail
-
FromParentToChildIterator
public FromParentToChildIterator(Tensor tensor, TraverseGuide guide)
-
FromParentToChildIterator
public FromParentToChildIterator(Tensor tensor)
-
-
Method Detail
-
depth
public int depth()
Description copied from interface:TreeIteratorReturns the current depth in the tree.- Specified by:
depthin interfaceTreeIterator- Returns:
- current depth in the tree
-
next
public Tensor next()
Description copied from interface:TreeIteratorReturns the next tensor in tree or null if iteration is finished- Specified by:
nextin interfaceTreeIterator- Returns:
- the next tensor in tree or null if iteration is finished
-
result
public Tensor result()
Description copied from interface:TreeIteratorReturns the result after iteration finished (or stopped). After this step the iterator becomes broken.- Specified by:
resultin interfaceTreeIterator- Returns:
- the result after iteration finished (or stopped)
-
set
public void set(Tensor tensor)
Description copied from interface:TreeIteratorSet current tensor in tree.- Specified by:
setin interfaceTreeIterator- Parameters:
tensor- tensor
-
-
DataMelt 3.0 © DataMelt by jWork.ORG