|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmtree.SearchQueue<T>
public class SearchQueue<T extends java.io.Serializable>
Constructor Summary | |
---|---|
SearchQueue()
Create a new instance of SearchQueue. |
|
SearchQueue(int initialSize)
Create a new instance of SearchQueue. |
Method Summary | |
---|---|
void |
add(T object,
float mainDistance)
Add object to the queue using the sorting of mainDistance and secondaryDistance. |
void |
add(T object,
float mainDistance,
float secondaryDistance)
Add object to the queue using the sorting of mainDistance and secondaryDistance. |
void |
compact()
Compact the memory used by internal array of this queue. |
float |
getHeadMainDistance()
Returns the main sort key of the current queue head. |
float |
getHeadSecondaryDistance()
Returns the secondary sort key of the current queue head. |
int |
getSize()
Returns the actual number of elements in this queue. |
boolean |
isEmpty()
Returns true if this queue contains no elements. |
T |
remove()
Retrieves and removes the head of this queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SearchQueue(int initialSize)
initialSize
- the initial size of the queuepublic SearchQueue()
Method Detail |
---|
public int getSize()
public boolean isEmpty()
public float getHeadMainDistance() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
- if the queue is emptypublic float getHeadSecondaryDistance() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
- if the queue is emptypublic void add(T object, float mainDistance, float secondaryDistance)
object
- the data to associate with the keysmainDistance
- the main sort keysecondaryDistance
- the secondary sort keypublic void add(T object, float mainDistance)
object
- the data to associate with the keysmainDistance
- the main sort keypublic T remove() throws java.util.NoSuchElementException
compact()
method.
java.util.NoSuchElementException
- if this queue is emptypublic void compact()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |