public class LevelSpecification extends LevelSpec
fCurrentDepth, fCurrentLevel, fFromDepth, fFromLevel, fIncludeHeads, fToDepth, fToLevel
Constructor and Description |
---|
LevelSpecification()
Create a LevelSpecification with level from 0 to Integer.MAX_VALUE
|
LevelSpecification(IExpr expr,
boolean includeHeads)
Create a LevelSpecification from an IInteger or IAST list-object.
|
LevelSpecification(int level)
Create a LevelSpecification with only the given level
|
LevelSpecification(int levelFrom,
int levelTo)
Create a LevelSpecification with the given level range
|
Modifier and Type | Method and Description |
---|---|
int |
compareDepth(int i) |
int |
compareLevel() |
int |
compareLevel(int i) |
int |
getFrom()
Get the low level-limit
|
int |
getTo()
Get the high level-limit.
|
boolean |
includesDepth(int i) |
boolean |
includesLevel(int i) |
void |
setFrom(int i) |
void |
setTo(int i) |
decCurrentDepth, decCurrentLevel, getCurrentDepth, getCurrentLevel, getFromDepth, getFromLevel, getToDepth, getToLevel, incCurrentLevel, isIncludeHeads, isInRange, isInScope, resetCurrentLevel, setCurrentDepth, setCurrentLevel, setFromLevelAsCurrent, setToLevelAsCurrent
public LevelSpecification()
public LevelSpecification(IExpr expr, boolean includeHeads)
expr
is a non-negative IInteger iValue set Level
{1,iValue};expr
is a negative IInteger iValue set Level {iValue, 0};expr
is a List {i0Value, i1Value} set Level {i0Value,
i1Value};expr
- includeHeads
- TODOMathException
- if the expr is not a level specificationpublic LevelSpecification(int level)
public LevelSpecification(int levelFrom, int levelTo)
public int getFrom()
from
value of the level instancepublic int getTo()
to
value of the level instancepublic final boolean includesDepth(int i)
public final boolean includesLevel(int i)
public final int compareDepth(int i)
public final int compareLevel()
public final int compareLevel(int i)
public void setFrom(int i)
i
- public void setTo(int i)
i
-