|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jibx.util.ReferenceCountMap
public class ReferenceCountMap
Hash map for counting references to Object keys. The map implementation is not very efficient when
resizing, but works well when the size of the map is known in advance or when accesses are substantially more common
than adds.
| Constructor Summary | |
|---|---|
ReferenceCountMap()
Default constructor. |
|
ReferenceCountMap(int count)
Constructor with count. |
|
ReferenceCountMap(ReferenceCountMap base)
Copy (clone) constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear all keys and counts. |
Object |
clone()
Construct a copy of the table. |
int |
getCount(Object key)
Find an entry in the table. |
int |
incrementCount(Object key)
Increment a use count in the table. |
Iterator |
iterator()
Get iterator for keys in map. |
Object[] |
keyArray()
Get array of keys in map. |
int |
size()
Get number of entries in map. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReferenceCountMap(int count)
count - number of values to assume in initial sizing of tablepublic ReferenceCountMap()
public ReferenceCountMap(ReferenceCountMap base)
base - instance being copied| Method Detail |
|---|
public int incrementCount(Object key)
key - referenced object (non-null)
public final int getCount(Object key)
key - key for entry to be returned
public int size()
public Iterator iterator()
public Object[] keyArray()
public Object clone()
clone in class Objectpublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||