cc.redberry.core.tensor.iterator
Class FromChildToParentIterator
- java.lang.Object
-
- cc.redberry.core.tensor.iterator.FromChildToParentIterator
-
- All Implemented Interfaces:
- TreeIterator
public final class FromChildToParentIterator extends java.lang.ObjectWrapper for TreeTraverseIterator. Return onlyEnteringelements. Traverse from out.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description FromChildToParentIterator(Tensor tensor)FromChildToParentIterator(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
-
FromChildToParentIterator
public FromChildToParentIterator(Tensor tensor, TraverseGuide guide)
-
FromChildToParentIterator
public FromChildToParentIterator(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