T - public class MapCount<T> extends Object implements Serializable
| Constructor and Description |
|---|
MapCount() |
MapCount(HashMap<T,Double> hm) |
MapCount(int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T t)
计数增加.默认为1
|
void |
add(T t,
double n)
增加一个元素
|
void |
add(T t,
int n)
兼容旧的api
|
void |
addAll(Collection<T> collection)
批量增加
|
void |
addAll(Collection<T> collection,
double weight)
批量增加
|
void |
addAll(Map<T,Double> map)
批量增加
|
HashMap<T,Double> |
get()
得道内部的map
|
String |
getDic()
将map序列化为词典格式
|
void |
remove(T t)
删除一个元素
|
int |
size()
map的大小
|
public void add(T t, double n)
t - n - public void add(T t, int n)
t - n - public void add(T t)
t - public int size()
public void remove(T t)
t - public String getDic()
public void addAll(Collection<T> collection)
hs - public void addAll(Collection<T> collection, double weight)
hs - Copyright © 2017. All rights reserved.