|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.data.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.
MapKey,
Serialized Form| Field Summary | |
static java.lang.Class |
BEST_CLASS_FOR_LONGEST_MATCH
|
static java.lang.String |
MATCH_ALL
|
static java.lang.String |
MATCH_EXACT
|
static java.lang.String |
MATCH_LONGEST
|
static java.lang.String |
MATCH_WILDCARD
|
| Constructor Summary | |
Map()
|
|
| Method Summary | |
void |
addEntry(MapKey key_,
java.lang.Object entry_)
Add the key-entry pair to the Map. |
boolean |
anyMatch(BitSet key_)
|
java.lang.String |
binaryRepresentation()
Prints out the content of this map and represents the keys in the binary form. |
java.lang.String |
binaryRepresentation(boolean skipLeadingZeros_)
Prints out the content of this map and represents the keys in the binary form. |
java.lang.String |
binaryRepresentation(int length_)
Prints out the content of this map and represents the keys in the binary form. |
java.lang.String |
diag()
Printout for diagnosis. |
void |
duplicate(java.lang.Object source_)
opies the content of the source_ object to this object.
|
java.lang.Object |
get(BitSet bs_,
java.lang.String matchType_)
For "longest match" and "match all". |
java.lang.Object |
get(MapKey key_,
java.lang.String matchType_)
For "exact match" and "wildcard match". |
java.lang.Object[] |
getAllEntries()
|
MapKey[] |
getAllKeys()
|
static Map |
getBestImplementationForLongestMatch()
|
int |
getSize()
Returns the current size (number of entries) of the map. |
java.lang.String |
hexRepresentation()
Prints out the content of this map and represents the keys in the hex form. |
java.lang.String |
hexRepresentation(boolean skipLeadingZeros_)
Prints out the content of this map and represents the keys in the hex form. |
java.lang.String |
hexRepresentation(int length_)
Prints out the content of this map and represents the keys in the hex form. |
java.lang.String |
info()
Prints out the content of this map and represents the keys by the indices of 1's. |
java.lang.String |
numberRepresentation()
Prints out the content of this map and represents the keys in the form of long integers. |
java.lang.Object |
remove(BitSet bs_,
java.lang.String matchType_)
For "longest match" and "match all". |
java.lang.Object |
remove(MapKey key_,
java.lang.String matchType_)
For "exact match" and "wildcard match". |
void |
removeEntry(java.lang.Object entry_)
|
void |
reset()
Removes all the entries. |
| Methods inherited from class drcl.DrclObj |
clone, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static java.lang.Class BEST_CLASS_FOR_LONGEST_MATCH
public static final java.lang.String MATCH_EXACT
public static final java.lang.String MATCH_LONGEST
public static final java.lang.String MATCH_ALL
public static final java.lang.String MATCH_WILDCARD
| Constructor Detail |
public Map()
| Method Detail |
public static final Map getBestImplementationForLongestMatch()
public void reset()
public void duplicate(java.lang.Object source_)
DrclObjsource_ object to this object.
he subclass must implement this method to realize DrclObj.clone().
duplicate in interface ObjectDuplicableduplicate in class DrclObj
public void addEntry(MapKey key_,
java.lang.Object entry_)
key_ - the key.entry_ - the entry.
public java.lang.Object get(MapKey key_,
java.lang.String matchType_)
for "longest match" and "match all".
public java.lang.Object get(BitSet bs_,
java.lang.String matchType_)
for "exact match" and "wildcard match".public boolean anyMatch(BitSet key_)
key_ - the key to match.
public java.lang.Object remove(MapKey key_,
java.lang.String matchType_)
for "longest match" and "match all".
public java.lang.Object remove(BitSet bs_,
java.lang.String matchType_)
for "exact match" and "wildcard match".public void removeEntry(java.lang.Object entry_)
public java.lang.Object[] getAllEntries()
public MapKey[] getAllKeys()
public int getSize()
public java.lang.String info()
public java.lang.String diag()
public java.lang.String numberRepresentation()
public java.lang.String binaryRepresentation()
public java.lang.String binaryRepresentation(boolean skipLeadingZeros_)
MapKey.binaryRepresentation(boolean).public java.lang.String binaryRepresentation(int length_)
MapKey.binaryRepresentation(int).public java.lang.String hexRepresentation()
public java.lang.String hexRepresentation(boolean skipLeadingZeros_)
MapKey.hexRepresentation(boolean).public java.lang.String hexRepresentation(int length_)
MapKey.hexRepresentation(int).
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||