cc.redberry.core.transformations.substitutions
Class SubstitutionIterator
- java.lang.Object
-
- cc.redberry.core.transformations.substitutions.SubstitutionIterator
-
- All Implemented Interfaces:
- TreeIterator
public final class SubstitutionIterator extends java.lang.Object implements TreeIterator
- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description SubstitutionIterator(Tensor tensor)SubstitutionIterator(Tensor tensor, TraverseGuide traverseGuide)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intdepth()Returns the current depth in the tree.int[]getForbidden()booleanisCurrentModified()Tensornext()Returns the next tensor in tree or null if iteration is finishedTensorresult()Returns the result after iteration finished (or stopped).voidsafeSet(Tensor tensor)voidset(Tensor tensor)Set current tensor in tree.voidset(Tensor tensor, boolean supposeIndicesAreAdded)voidunsafeSet(Tensor tensor)
-
-
-
Constructor Detail
-
SubstitutionIterator
public SubstitutionIterator(Tensor tensor)
-
SubstitutionIterator
public SubstitutionIterator(Tensor tensor, TraverseGuide traverseGuide)
-
-
Method Detail
-
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
-
unsafeSet
public void unsafeSet(Tensor tensor)
-
set
public void set(Tensor tensor)
Description copied from interface:TreeIteratorSet current tensor in tree.- Specified by:
setin interfaceTreeIterator- Parameters:
tensor- tensor
-
set
public void set(Tensor tensor, boolean supposeIndicesAreAdded)
-
safeSet
public void safeSet(Tensor tensor)
-
isCurrentModified
public boolean isCurrentModified()
-
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)
-
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
-
getForbidden
public int[] getForbidden()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG