Class BTreeQueue<E>
java.lang.Object
com.oracle.truffle.runtime.collection.BTreeQueue<E>
Queue implementation based on the B-tree data structure.
The elements in the queue are ordered, and placed into leaf nodes. Each leaf node has at most
BRANCHING_FACTOR elements, and each inner node has at most BRANCHING_FACTOR
elements. The tree is kept balanced so that all the leaves are at the same depth. Nodes whose
entry-count drops below a particular value are compressed to avoid wasting space.
-
Constructor Details
-
BTreeQueue
public BTreeQueue()
-
-
Method Details
-
add
-
addIndexOf
-
indexOf
-
indexBefore
-
poll
-
peek
-
clear
public void clear() -
size
public int size() -
toArray
-
toArray
public <T> T[] toArray(T[] a) -
internalCapacity
public int internalCapacity() -
checkInvariants
public void checkInvariants() -
prettyString
-