|
net.datastructures - version 4.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.datastructures.SortedListPriorityQueue<K,V>
net.datastructures.SortedListAdaptablePriorityQueue<K,V>
public class SortedListAdaptablePriorityQueue<K,V>
Implementation of an adaptable priority queue by means of a sorted list.
| Nested Class Summary | |
|---|---|
protected static class |
SortedListAdaptablePriorityQueue.LocationAwareEntry<K,V>
Inner class for a location-aware entry |
| Nested classes/interfaces inherited from class net.datastructures.SortedListPriorityQueue |
|---|
SortedListPriorityQueue.MyEntry<K,V> |
| Field Summary |
|---|
| Fields inherited from class net.datastructures.SortedListPriorityQueue |
|---|
actionPos, c, entries |
| Constructor Summary | |
|---|---|
SortedListAdaptablePriorityQueue()
Creates the priority queue with the default comparator |
|
SortedListAdaptablePriorityQueue(Comparator<K> comp)
Creates the priority queue with the given comparator |
|
SortedListAdaptablePriorityQueue(PositionList<Entry<K,V>> list,
Comparator<K> comp)
Creates the priority queue with the given comparator and list. |
|
| Method Summary | |
|---|---|
protected void |
checkEntry(Entry ent)
Determines whether a given entry is valid |
Entry<K,V> |
insert(K k,
V v)
Inserts a key-value pair and returns the entry created |
Entry<K,V> |
remove(Entry<K,V> entry)
Removes and returns the given entry |
K |
replaceKey(Entry<K,V> entry,
K k)
Replaces the key of the given entry |
V |
replaceValue(Entry<K,V> e,
V value)
Replaces the value of the given entry |
| Methods inherited from class net.datastructures.SortedListPriorityQueue |
|---|
checkKey, insertEntry, isEmpty, min, removeMin, setComparator, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.datastructures.PriorityQueue |
|---|
isEmpty, min, removeMin, size |
| Constructor Detail |
|---|
public SortedListAdaptablePriorityQueue()
public SortedListAdaptablePriorityQueue(Comparator<K> comp)
public SortedListAdaptablePriorityQueue(PositionList<Entry<K,V>> list,
Comparator<K> comp)
| Method Detail |
|---|
public Entry<K,V> insert(K k,
V v)
throws InvalidKeyException
insert in interface PriorityQueue<K,V>insert in class SortedListPriorityQueue<K,V>InvalidKeyExceptionpublic Entry<K,V> remove(Entry<K,V> entry)
remove in interface AdaptablePriorityQueue<K,V>
public K replaceKey(Entry<K,V> entry,
K k)
replaceKey in interface AdaptablePriorityQueue<K,V>
public V replaceValue(Entry<K,V> e,
V value)
replaceValue in interface AdaptablePriorityQueue<K,V>
protected void checkEntry(Entry ent)
throws InvalidEntryException
InvalidEntryException
|
net.datastructures - version 4.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||