public class PosInProgram
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static PosInProgram |
ONE |
static PosInProgram |
ONE_ONE |
static PosInProgram |
ONE_ZERO |
static PosInProgram |
TOP
pos at the beginning of the program
|
static PosInProgram |
ZERO
often used positions
|
static PosInProgram |
ZERO_ONE |
static PosInProgram |
ZERO_ZERO |
Modifier and Type | Method and Description |
---|---|
PosInProgram |
append(PosInProgram pp) |
int |
depth()
size of the position list
|
PosInProgram |
down(int n)
descending downwards choosing the n'th statement of the program
|
boolean |
equals(java.lang.Object obj)
compares this PosInProgram with another PosInProgram
and returns true if both describe the same position
|
int |
get(int i) |
ProgramElement |
getProgram(ProgramElement pe) |
static ProgramElement |
getProgramAt(PosInProgram pos,
ProgramElement prg)
returns the ProgramElement at the given position
|
int |
hashCode() |
IntIterator |
iterator()
returns an iterator over the list defining the position in a term.
|
int |
last()
return the last index (or -1 if this == TOP)
|
boolean |
leq(PosInProgram pip) |
PosInProgram |
prepend(PosInProgram pp) |
java.lang.String |
toString()
toString
|
PosInProgram |
up()
ascends one AST level
|
public static final PosInProgram TOP
public static final PosInProgram ZERO
public static final PosInProgram ZERO_ZERO
public static final PosInProgram ZERO_ONE
public static final PosInProgram ONE
public static final PosInProgram ONE_ZERO
public static final PosInProgram ONE_ONE
public static ProgramElement getProgramAt(PosInProgram pos, ProgramElement prg)
pos
- the PosInProgramprg
- the ProgramElement we walk throughjava.lang.IndexOutOfBoundsException
- if the given position
refers to a non-existant programpublic int depth()
public PosInProgram down(int n)
n
- the int describes the position of the statement in the blockpublic PosInProgram up()
public PosInProgram append(PosInProgram pp)
public PosInProgram prepend(PosInProgram pp)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean leq(PosInProgram pip)
public int get(int i)
public int last()
public ProgramElement getProgram(ProgramElement pe)
public IntIterator iterator()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2003-2019 The KeY-Project.