public class SortedHeap extends Object
| Constructor and Description |
|---|
SortedHeap()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(HeapElement element)
Adds the element
|
HeapElement |
get(int i)
Retrieves the elment in the given position
|
int |
getNumberOfElements()
Retrieves the number of results
|
void |
sort()
Sorts the existing elements
|
public int getNumberOfElements()
public HeapElement get(int i)
i - The index of the elmnt to retrievepublic void add(HeapElement element)
element - The elmentpublic void sort()
Copyright © 2014. All Rights Reserved.