Class BoolWorld

  • All Implemented Interfaces:
    World

    public class BoolWorld
    extends Object
    implements World
    A world devoted to integers.
    Since:
    29/05/2016
    Author:
    Fabien Hermenier, Charles Prud'homme
    • Constructor Detail

      • BoolWorld

        public BoolWorld​(int defaultSize,
                         double loadfactor)
        Make a new world.
        Parameters:
        defaultSize - the default world size
    • Method Detail

      • savePreviousState

        public void savePreviousState​(StoredBool v,
                                      boolean oldValue,
                                      int oldStamp)
        Reacts when a StoredBool is modified: push the former value & timestamp on the stacks.
      • revert

        public void revert()
        Description copied from interface: World
        Pop all the stack.
        Specified by:
        revert in interface World
      • clear

        public void clear()
        Description copied from interface: World
        Clean the stack
        Specified by:
        clear in interface World
      • used

        public int used()
        Description copied from interface: World
        The amount of values in the stack
        Specified by:
        used in interface World
        Returns:
        a positive integer
      • allocated

        public int allocated()
        Description copied from interface: World
        The allocated trail for this world.
        Specified by:
        allocated in interface World
        Returns:
        a positive number