Top Inners Fields Constructors Methods
org.fxmisc.undo.impl

public Class FixedSizeChangeQueue<C>

extends Object
implements ChangeQueue<C>
Class Inheritance
All Implemented Interfaces
org.fxmisc.undo.impl.ChangeQueue
Imports
java.util.NoSuchElementException

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final int
private final RevisionedChange<C>[]
private int
private long
private int
private int
private long

Constructor Summary

AccessConstructor and Description
public
FixedSizeChangeQueue(int capacity)

Method Summary

Modifier and TypeMethod and Description
private int
arrayIndex(int queuePosition)

private RevisionedChange<C>
fetch(int position)

private long
public void
public ChangeQueue.QueuePosition
public boolean
public boolean
public C
next()

Implements org.fxmisc.undo.impl.ChangeQueue.next.

Returns the next item and increases the current position by 1.

public C
peekNext()

Implements org.fxmisc.undo.impl.ChangeQueue.peekNext.

Returns the next item.

public C
peekPrev()

Implements org.fxmisc.undo.impl.ChangeQueue.peekPrev.

Returns the previous item.

public C
prev()

Implements org.fxmisc.undo.impl.ChangeQueue.prev.

Returns the previous item and decreases the current position by 1.

public final void
private RevisionedChange<C>
put(int position, RevisionedChange<C> c)

private int
relativize(int arrayPos)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

capacityback to summary
private final int capacity
changesback to summary
private final RevisionedChange<C>[] changes
currentPositionback to summary
private int currentPosition
revisionback to summary
private long revision
sizeback to summary
private int size
startback to summary
private int start
zeroPositionRevisionback to summary
private long zeroPositionRevision

Constructor Detail

FixedSizeChangeQueueback to summary
public FixedSizeChangeQueue(int capacity)
Annotations
@SuppressWarnings:unchecked

Method Detail

arrayIndexback to summary
private int arrayIndex(int queuePosition)
fetchback to summary
private RevisionedChange<C> fetch(int position)
fetchRevisionForPositionback to summary
private long fetchRevisionForPosition(int position)
forgetHistoryback to summary
public void forgetHistory()

Implements org.fxmisc.undo.impl.ChangeQueue.forgetHistory.

Annotations
@Override
getCurrentPositionback to summary
public ChangeQueue.QueuePosition getCurrentPosition()

Implements org.fxmisc.undo.impl.ChangeQueue.getCurrentPosition.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements org.fxmisc.undo.impl.ChangeQueue.hasNext.

Annotations
@Override
hasPrevback to summary
public boolean hasPrev()

Implements org.fxmisc.undo.impl.ChangeQueue.hasPrev.

Annotations
@Override
nextback to summary
public C next()

Implements org.fxmisc.undo.impl.ChangeQueue.next.

Doc from org.fxmisc.undo.impl.ChangeQueue.next.

Returns the next item and increases the current position by 1.

Annotations
@Override
peekNextback to summary
public C peekNext()

Implements org.fxmisc.undo.impl.ChangeQueue.peekNext.

Doc from org.fxmisc.undo.impl.ChangeQueue.peekNext.

Returns the next item. Current position stays unchanged.

Annotations
@Override
peekPrevback to summary
public C peekPrev()

Implements org.fxmisc.undo.impl.ChangeQueue.peekPrev.

Doc from org.fxmisc.undo.impl.ChangeQueue.peekPrev.

Returns the previous item. Current position stays unchanged.

Annotations
@Override
prevback to summary
public C prev()

Implements org.fxmisc.undo.impl.ChangeQueue.prev.

Doc from org.fxmisc.undo.impl.ChangeQueue.prev.

Returns the previous item and decreases the current position by 1.

Annotations
@Override
pushback to summary
public final void push(C... changes)

Implements org.fxmisc.undo.impl.ChangeQueue.push.

Annotations
@Override
@SafeVarargs
putback to summary
private RevisionedChange<C> put(int position, RevisionedChange<C> c)
relativizeback to summary
private int relativize(int arrayPos)
org.fxmisc.undo.impl back to summary

private Class FixedSizeChangeQueue.QueuePositionImpl

extends Object
implements QueuePosition
Class Inheritance
All Implemented Interfaces
org.fxmisc.undo.impl.ChangeQueue.QueuePosition

Field Summary

Modifier and TypeField and Description
private final int
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
QueuePositionImpl(int arrayPos, long rev)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object other)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

private FixedSizeChangeQueue<C>
public boolean
Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayPosback to summary
private final int arrayPos
revback to summary
private final long rev

Constructor Detail

QueuePositionImplback to summary
pack-priv QueuePositionImpl(int arrayPos, long rev)

Method Detail

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getQueueback to summary
private FixedSizeChangeQueue<C> getQueue()
isValidback to summary
public boolean isValid()

Implements org.fxmisc.undo.impl.ChangeQueue.QueuePosition.isValid.

Annotations
@Override