|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.trinity.cs.gamecore.ListBasedPriorityQueue<B,E>
public class ListBasedPriorityQueue<B extends Block<B,E>,E extends GameEntity<B,E>>
This is an implementation of the PriorityQueue interface that uses a linked list. It is provided so that you can do the early assignments before you write your own.
This class is a generic that takes the general block type and the general entity type for each game.
Constructor Summary | |
---|---|
ListBasedPriorityQueue()
|
Method Summary | |
---|---|
void |
add(E ge)
This method adds a GameEntity into the queue. |
E |
getFirst()
This method should return the first entity in the queue. |
void |
removeFirst()
This method removes the first entity from the queue assuming one is present. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListBasedPriorityQueue()
Method Detail |
---|
public void add(E ge)
PriorityQueue
add
in interface PriorityQueue<B extends Block<B,E>,E extends GameEntity<B,E>>
ge
- The game entity to be added.public void removeFirst()
PriorityQueue
removeFirst
in interface PriorityQueue<B extends Block<B,E>,E extends GameEntity<B,E>>
public E getFirst()
PriorityQueue
getFirst
in interface PriorityQueue<B extends Block<B,E>,E extends GameEntity<B,E>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |