Interface BacktrackableManager

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addChanged​(int index)
      It allows to inform the manager that a given item with id (index) has changed at given level.
      int getLevel()
      It returns the current level at which the changes are being registered.
      boolean isRecognizedAsChanged​(int index)
      It allows for easy testing if a given object is considered by the manager as the object which has changed and needs being informed about backtracking.
      void removeLevel​(int removedLevel)
      It allows to inform all objects which have changed at removedLevel that the backtracking from that level has occurred.
      void setLevel​(int level)
      It specifies the level which should become the active one in the manager.
      void setSize​(int size)
      It specifies how many objects within objects array are being actually managed.
      void update​(Backtrackable[] objects, int noOfObjects)
      It updates the manager with new array of objects to manage and new number of them.
    • Method Detail

      • addChanged

        void addChanged​(int index)
        It allows to inform the manager that a given item with id (index) has changed at given level.
        Parameters:
        index - it specifies the index of the object which has changed.
      • setLevel

        void setLevel​(int level)
        It specifies the level which should become the active one in the manager.
        Parameters:
        level - the active level at which the changes will be recorded.
      • removeLevel

        void removeLevel​(int removedLevel)
        It allows to inform all objects which have changed at removedLevel that the backtracking from that level has occurred.
        Parameters:
        removedLevel - it specifies the level which is being removed.
      • setSize

        void setSize​(int size)
        It specifies how many objects within objects array are being actually managed. It allows to specify partially empty array.
        Parameters:
        size - the number of objects in the array.
      • isRecognizedAsChanged

        boolean isRecognizedAsChanged​(int index)
        It allows for easy testing if a given object is considered by the manager as the object which has changed and needs being informed about backtracking.
        Parameters:
        index - the position of the object which status is in question.
        Returns:
        it returns true if the manager recognizes object at position index as changed one.
      • getLevel

        int getLevel()
        It returns the current level at which the changes are being registered.
        Returns:
        the active level for which the changes are being registered.
      • update

        void update​(Backtrackable[] objects,
                    int noOfObjects)
        It updates the manager with new array of objects to manage and new number of them. This function works properly only during model creation phase, so manager can learn about freshly created objects. If used during search then the old array must be part of the new array to allow manager work properly.
        Parameters:
        objects - a new array of objects
        noOfObjects - number of objects in the new array to be taken care of.