public class TopQueue
extends java.lang.Object
Constructor | Description |
---|---|
TopQueue(int top) |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
add(int e,
double v) |
Attempts to add a new entry
|
int[] |
getList() |
Returns the entries in the queue as an array
|
int[] |
getList(int n) |
Returns the entries in the queue as an array.
|
double[] |
getValueList() |
Returns the entries in the values as an array
|
double[] |
getValueList(int n) |
Returns the values in the queue as an array.
|
public TopQueue(int top)
top
- The number of top entries to storepublic boolean add(int e, double v)
e
- The entryv
- The entry's valuepublic int[] getList()
public int[] getList(int n)
n
- The number of entries to returnpublic double[] getValueList()
public double[] getValueList(int n)
n
- The number of entries to return