|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttom.library.sl.Environment
public final class Environment
Object that represents an environment of a strategy the position where the strategy is applied a pointer to subterm the root is stored in the first cell
Field Summary | |
---|---|
protected int |
current
|
static int |
FAILURE
|
static int |
IDENTITY
|
protected Introspector |
introspector
|
protected int[] |
omega
|
protected int |
status
|
protected Object[] |
subterm
|
static int |
SUCCESS
|
Constructor Summary | |
---|---|
Environment()
|
|
Environment(Introspector introspector)
|
Method Summary | |
---|---|
Object |
clone()
|
int |
depth()
Get the depth of the position in the tree |
void |
down(int n)
add a sub-position n |
boolean |
equals(Object o)
Tests if two environments are equals |
void |
followPath(Path path)
|
void |
followPathLocal(Path path)
|
Object |
getAncestor()
get the term that corresponds to the ancestor of current position |
List<Object> |
getCurrentStack()
get the current stack |
Introspector |
getIntrospector()
|
Position |
getPosition()
get the current position |
Object |
getRoot()
get the current root |
int |
getStatus()
|
Object |
getSubject()
get the term that corresponds to the current position |
int |
getSubOmega()
get the current sub-position |
void |
goToPosition(Position p)
|
int |
hashCode()
|
void |
setIntrospector(Introspector i)
|
void |
setRoot(Object root)
set the current root |
void |
setStatus(int s)
|
void |
setSubject(Object root)
set the current term |
String |
toString()
Returns a String object representing the position. |
void |
up()
remove the last sub-position Up and down are made public to allow to write compiled strategies by hand This may be a BAD idea |
void |
upLocal()
package private remove the last sub-position but does not update the subject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SUCCESS
public static final int FAILURE
public static final int IDENTITY
protected int current
protected int[] omega
protected Object[] subterm
protected Introspector introspector
protected int status
Constructor Detail |
---|
public Environment()
public Environment(Introspector introspector)
Method Detail |
---|
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getStatus()
public void setStatus(int s)
public Object getRoot()
public void setRoot(Object root)
public List<Object> getCurrentStack()
public Object getAncestor()
public Object getSubject()
public void setSubject(Object root)
public Introspector getIntrospector()
public void setIntrospector(Introspector i)
public int getSubOmega()
public Position getPosition()
public int depth()
public void up()
public void upLocal()
public void down(int n)
n
- sub-position number. 1 is the first possible sub-positionpublic void goToPosition(Position p)
public void followPath(Path path)
public void followPathLocal(Path path)
public String toString()
String
object representing the position.
The string representation consists of a list of elementary positions
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |