Class EnumDelta

  • All Implemented Interfaces:
    IDelta, IEnumDelta, IntDelta

    public final class EnumDelta
    extends TimeStampedObject
    implements IEnumDelta
    A class to store the removed value of an integer variable.

    It defines methods to add a value, clear the structure and execute a Procedure for each value stored.

    • Constructor Detail

    • Method Detail

      • lazyClear

        public void lazyClear()
        Description copied from interface: IDelta
        Lazy clear the delta, on world change
        Specified by:
        lazyClear in interface IDelta
      • add

        public void add​(int value,
                        ICause cause)
        Adds a new value to the delta
        Specified by:
        add in interface IEnumDelta
        Parameters:
        value - value to add
        cause - of the removal
      • get

        public int get​(int idx)
        Description copied from interface: IEnumDelta
        Return the idx^th value stored in the delta, if any
        Specified by:
        get in interface IEnumDelta
        Parameters:
        idx - rank of the value
        Returns:
        idx^th value
      • getCause

        public ICause getCause​(int idx)
        Description copied from interface: IntDelta
        Return the cause of the idx^th cause stored in the delta, if any
        Specified by:
        getCause in interface IntDelta
        Parameters:
        idx - rank of the interval
        Returns:
        cause of the removal
      • size

        public int size()
        Description copied from interface: IntDelta
        Returns the number of element
        Specified by:
        size in interface IntDelta
        Returns:
        number of element