|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object vanetsim.routing.A_Star.A_Star_LookupTable<K,V>
public class A_Star_LookupTable<K,V>
A LookupTable for the mapping between Nodes and A_Star_Nodes. Uses the nodeid to
construct an extremely very efficient lookup in an array. This has a far better
performance than traditional HashMaps because no hashing is needed and no
collisions can occur.
If you encounter any problems you may switch to the standard Java Hashmap by just
replacing all occurences.
Constructor Summary | |
---|---|
A_Star_LookupTable(int initialCapacity)
Constructs an empty LookupTable. |
Method Summary | |
---|---|
A_Star_Node |
get(Node key)
Returns the value to which the specified node is mapped, or null if this map contains no mapping for the key. |
void |
put(Node key,
A_Star_Node value)
Associates the specified value with the specified key in this map. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public A_Star_LookupTable(int initialCapacity)
initialCapacity
- the initial capacity.Method Detail |
---|
public A_Star_Node get(Node key)
null
if this map contains no mapping for the key.
public void put(Node key, A_Star_Node value)
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |