ObjectComparator. This implementation
is non-blocking, dynamically resizing and thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected Object[] | |
| protected Comparator |
| Access | Constructor and Description |
|---|---|
| public | HsqlArrayHeap(int
int capacity, Comparator<E> Comparator comparator)Creates a new HsqlArrayHeap with the given initial capacity, using the specified ObjectComparator to maintain the heap invariant. |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized boolean | |
| public synchronized void | |
| private void | |
| public synchronized boolean | |
| public synchronized boolean | |
| public synchronized E | peek()
Implements org. Retrieves the least element from this Heap, without removing it. |
| public synchronized E | remove()
Implements org. Retrieves the least element from this Heap, removing it in the process. |
| public synchronized int | size()
Implements org. Retrieves the number of elements currently in this Heap. |
| public synchronized String |
| count | back to summary |
|---|---|
| protected int count | |
| heap | back to summary |
|---|---|
| protected Object[] heap | |
| oc | back to summary |
|---|---|
| protected Comparator<E> oc | |
| HsqlArrayHeap | back to summary |
|---|---|
| public HsqlArrayHeap(int capacity, Comparator<E> comparator) throws IllegalArgumentException Creates a new HsqlArrayHeap with the given initial capacity, using the specified ObjectComparator to maintain the heap invariant.
| |
| add | back to summary |
|---|---|
| public synchronized boolean add(E o) Implements org. Doc from org. Adds the specified element to this Heap. | |
| clear | back to summary |
|---|---|
| public synchronized void clear() Implements org. Doc from org. Removes all elements from this Heap. | |
| increaseCapacity | back to summary |
|---|---|
| private void increaseCapacity() | |
| isEmpty | back to summary |
|---|---|
| public synchronized boolean isEmpty() Implements org. Doc from org. Retrieves whether this Heap is empty. | |
| isFull | back to summary |
|---|---|
| public synchronized boolean isFull() Implements org. Doc from org. Retrieves whether this Heap is full. | |
| peek | back to summary |
|---|---|
| public synchronized E peek() Implements org. Doc from org. Retrieves the least element from this Heap, without removing it. | |
| remove | back to summary |
|---|---|
| public synchronized E remove() Implements org. Doc from org. Retrieves the least element from this Heap, removing it in the process. | |
| size | back to summary |
|---|---|
| public synchronized int size() Implements org. Doc from org. Retrieves the number of elements currently in this Heap. | |
| toString | back to summary |
|---|---|
| public synchronized String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |