Class IntWorld

  • All Implemented Interfaces:
    World

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

      • IntWorld

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

      • savePreviousState

        public void savePreviousState​(StoredInt v,
                                      int oldValue,
                                      int oldStamp)
        Reacts when a StoredInt 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