|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
gov.nasa.alsUtility.KeyCounter
used to count the number of several different kinds of objects. The different kinds are represented by different keys. Uses integer objects for counting.
integer
,
Serialized FormConstructor Summary | |
KeyCounter()
|
Method Summary | |
void |
add(java.lang.Object key)
add to key's count |
void |
add(java.lang.Object key,
java.math.BigInteger count)
|
void |
add(java.lang.Object key,
int count)
|
void |
addKeyCounter(KeyCounter other)
|
java.math.BigInteger |
getCount(java.lang.Object key)
|
protected int |
getIntCount(java.lang.Object key)
For testint only. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object element)
overrides Hashtable.put to insure that the element is always a integer object |
double |
tanimotoDistance(KeyCounter other)
BUG: only works for counts that fit in an int. |
java.lang.String |
toString()
|
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KeyCounter()
Method Detail |
public java.lang.Object put(java.lang.Object key, java.lang.Object element)
put
in interface java.util.Map
integer
public void add(java.lang.Object key)
public void add(java.lang.Object key, int count)
public void add(java.lang.Object key, java.math.BigInteger count)
public void addKeyCounter(KeyCounter other)
public java.math.BigInteger getCount(java.lang.Object key)
protected int getIntCount(java.lang.Object key)
public double tanimotoDistance(KeyCounter other)
Tanimoto
public java.lang.String toString()
|
JavaGenes, NASA Ames. Written largely by Al Globus | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |