public class FixedSizeChangeQueue<C> extends java.lang.Object implements ChangeQueue<C>
ChangeQueue.QueuePosition
Constructor and Description |
---|
FixedSizeChangeQueue(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
forgetHistory() |
ChangeQueue.QueuePosition |
getCurrentPosition() |
boolean |
hasNext() |
boolean |
hasPrev() |
C |
next()
Returns the next item and increases the current position by 1.
|
C |
peekNext()
Returns the next item.
|
C |
peekPrev()
Returns the previous item.
|
C |
prev()
Returns the previous item and decreases the current position by 1.
|
void |
push(C... changes) |
public boolean hasNext()
hasNext
in interface ChangeQueue<C>
public boolean hasPrev()
hasPrev
in interface ChangeQueue<C>
public C peekNext()
ChangeQueue
peekNext
in interface ChangeQueue<C>
public C next()
ChangeQueue
next
in interface ChangeQueue<C>
public C peekPrev()
ChangeQueue
peekPrev
in interface ChangeQueue<C>
public C prev()
ChangeQueue
prev
in interface ChangeQueue<C>
public void forgetHistory()
forgetHistory
in interface ChangeQueue<C>
@SafeVarargs public final void push(C... changes)
push
in interface ChangeQueue<C>
public ChangeQueue.QueuePosition getCurrentPosition()
getCurrentPosition
in interface ChangeQueue<C>