Interface Backtrackable

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

    public interface Backtrackable
    Version:
    4.8

    It specifies the interface of the backtrackable object which is being recorded by Backtrackable Manager.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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 that is being removed.
      • 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.