drcl.data
Class RadixMap
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.data.Map
|
+--drcl.data.RadixMap
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectDuplicable, java.io.Serializable
- public class RadixMap
- extends Map
A map keeps (MapKey, entry object) pairs in it.
Given a MapKey, an entry/entries can be retrieved by
exact match, longest match, match, or wildcard match.
- See Also:
MapKey, Serialized Form
| Methods inherited from class drcl.data.Map |
anyMatch, binaryRepresentation, binaryRepresentation, binaryRepresentation, duplicate, get, get, getAllEntries, getAllKeys, getBestImplementationForLongestMatch, getMatches, getSize, getWildcardMatches, hexRepresentation, hexRepresentation, hexRepresentation, info, numberRepresentation, remove, remove, removeEntry, removeMatches, removeWildcardMatches |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RadixMap
public RadixMap()
reset
public void reset()
- Removes all the entries.
- Overrides:
reset in class Map
getLongestMatch
protected java.lang.Object getLongestMatch(BitSet key_)
- Description copied from class:
Map
- Returns the longest match.
- Overrides:
getLongestMatch in class Map
- Following copied from class:
drcl.data.Map
- Parameters:
key_ - the key to match.- Returns:
- the entry with the key matching the argument with largest number of bits.
getExactMatch
protected java.lang.Object getExactMatch(MapKey key_)
- Description copied from class:
Map
- Returns the exact match.
- Overrides:
getExactMatch in class Map
- Following copied from class:
drcl.data.Map
- Parameters:
key_ - the key to match.- Returns:
- the entry with the key exactly matching the argument.
removeLongestMatch
protected java.lang.Object removeLongestMatch(BitSet key_)
- Removes the longest match.
Repeate the action done in getLongestMatch, but in the final step
free the entry and delete the node from radix-tree
- Overrides:
removeLongestMatch in class Map
- Parameters:
key_ - the key to match.- Returns:
- the entry with the key matching the argument with largest number of bits.
removeExactMatch
protected java.lang.Object removeExactMatch(MapKey key_)
- Description copied from class:
Map
- Removes the exact match.
- Overrides:
removeExactMatch in class Map
- Following copied from class:
drcl.data.Map
- Parameters:
key_ - the key to match.- Returns:
- the entry with the key exactly matching the argument.
addEntry
public void addEntry(MapKey key_,
java.lang.Object entry_)
- Add the key-entry pair to the Map. No check is done
for duplicate keys.
- Overrides:
addEntry in class Map
- Parameters:
key_ - the key.entry_ - the entry.
diag
public java.lang.String diag()
- Description copied from class:
Map
- Printout for diagnosis.
- Overrides:
diag in class Map
Copyright © 2001 - DRCL, OSU ~ Back to JavaSim Home ~