JaCoP.core
Interface Backtrackable

All Known Implementing Classes:
BooleanVar, IntVar, SetVar, Var

public interface Backtrackable

Author:
Radoslaw Szymanek and Krzysztof Kuchcinski It specifies the interface of the backtrackable object which is being recorded by Backtrackable Manager.

Method Summary
 int index()
          It specifies the index/position of the backtrackable object.
 int level()
          It returns the level of the object (its last copy of the state).
 void remove(int removedLevel)
          It specifies the function being called by the manager upon backtracking.
 

Method Detail

remove

void remove(int removedLevel)
It specifies the function being called by the manager upon backtracking. The manager may call this function for the objects which have not changed but it must call this function for all objects that have changed.

Parameters:
removedLevel -

level

int level()
It returns the level of the object (its last copy of the state).

Returns:
the object level

index

int index()
It specifies the index/position of the backtrackable object. It is equal to the object unique id.

Returns:
index of the object.