Class UnlimitedChangeQueue<C>

  • All Implemented Interfaces:
    ChangeQueue<C>

    public class UnlimitedChangeQueue<C>
    extends java.lang.Object
    implements ChangeQueue<C>
    • Field Detail

      • currentPosition

        private int currentPosition
      • revision

        private long revision
      • zeroPositionRevision

        private long zeroPositionRevision
      • forgottenCount

        private int forgottenCount
    • Constructor Detail

      • UnlimitedChangeQueue

        public UnlimitedChangeQueue()
    • Method Detail

      • peekNext

        public final C peekNext()
        Description copied from interface: ChangeQueue
        Returns the next item. Current position stays unchanged.
        Specified by:
        peekNext in interface ChangeQueue<C>
      • next

        public final C next()
        Description copied from interface: ChangeQueue
        Returns the next item and increases the current position by 1.
        Specified by:
        next in interface ChangeQueue<C>
      • peekPrev

        public final C peekPrev()
        Description copied from interface: ChangeQueue
        Returns the previous item. Current position stays unchanged.
        Specified by:
        peekPrev in interface ChangeQueue<C>
      • prev

        public final C prev()
        Description copied from interface: ChangeQueue
        Returns the previous item and decreases the current position by 1.
        Specified by:
        prev in interface ChangeQueue<C>
      • push

        @SafeVarargs
        public final void push​(C... changes)
        Specified by:
        push in interface ChangeQueue<C>
      • revisionForPosition

        private long revisionForPosition​(int position)