org.matheclipse.core.eval.util
Class LevelSpec
- java.lang.Object
-
- org.matheclipse.core.eval.util.LevelSpec
-
- Direct Known Subclasses:
- LevelSpecification
public class LevelSpec extends java.lang.ObjectA level specification definition for levels in nested lists. Example: the nested list[x,[y]]has depth3
-
-
Constructor Summary
Constructors Constructor and Description LevelSpec()LevelSpec(int level)Define a level specification for all elements on levellevel.LevelSpec(int level, boolean includeHeads)LevelSpec(int fromLevel, int toLevel)LevelSpec(int fromLevel, int toLevel, boolean includeHeads)LevelSpec(int fromLevel, int toLevel, int fromDepth, int toDepth, boolean includeHeads)Example value set for including all levels:
fromLevel = 0;
toLevel = Integer.MAX_VALUE;
fromDepth = Integer.MIN_VALUE;
toDepth = -1;
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddecCurrentDepth()voiddecCurrentLevel()Decrements the current levelintgetCurrentDepth()intgetCurrentLevel()Get the current levelintgetFromDepth()intgetFromLevel()intgetToDepth()intgetToLevel()voidincCurrentLevel()Increments the current levelbooleanisIncludeHeads()booleanisInRange()booleanisInScope()voidresetCurrentLevel()voidsetCurrentDepth(int currentDepth)voidsetCurrentLevel(int currentLevel)voidsetFromLevelAsCurrent()voidsetToLevelAsCurrent()
-
-
-
Constructor Detail
-
LevelSpec
public LevelSpec()
-
LevelSpec
public LevelSpec(int level)
Define a level specification for all elements on levellevel.- Parameters:
level-
-
LevelSpec
public LevelSpec(int level, boolean includeHeads)
-
LevelSpec
public LevelSpec(int fromLevel, int toLevel)
-
LevelSpec
public LevelSpec(int fromLevel, int toLevel, boolean includeHeads)
-
LevelSpec
public LevelSpec(int fromLevel, int toLevel, int fromDepth, int toDepth, boolean includeHeads)Example value set for including all levels:
fromLevel = 0;
toLevel = Integer.MAX_VALUE;
fromDepth = Integer.MIN_VALUE;
toDepth = -1;- Parameters:
fromLevel-toLevel-fromDepth-toDepth-includeHeads-
-
-
Method Detail
-
getCurrentLevel
public final int getCurrentLevel()
Get the current level
-
resetCurrentLevel
public final void resetCurrentLevel()
-
setFromLevelAsCurrent
public final void setFromLevelAsCurrent()
-
setToLevelAsCurrent
public final void setToLevelAsCurrent()
-
decCurrentDepth
public final void decCurrentDepth()
-
incCurrentLevel
public final void incCurrentLevel()
Increments the current level
-
decCurrentLevel
public final void decCurrentLevel()
Decrements the current level
-
isInRange
public boolean isInRange()
-
isInScope
public boolean isInScope()
-
getCurrentDepth
public final int getCurrentDepth()
-
setCurrentDepth
public final void setCurrentDepth(int currentDepth)
-
setCurrentLevel
public final void setCurrentLevel(int currentLevel)
-
getFromLevel
public int getFromLevel()
- Returns:
- the from level
-
getToLevel
public int getToLevel()
- Returns:
- the to level
-
getFromDepth
public int getFromDepth()
- Returns:
- the from depth
-
getToDepth
public int getToDepth()
- Returns:
- the to depth
-
isIncludeHeads
public boolean isIncludeHeads()
- Returns:
- if the level includes the heads of an expression
-
-
DMelt 3.0 © DataMelt by jWork.ORG