public class SingletonMap<K,V> extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SingletonMap.Builder<K,V> |
| Constructor and Description |
|---|
SingletonMap(SingletonMap.Builder<K,V> builder) |
SingletonMap(SingletonMap.Builder<K,V> builder,
long maxAge) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object key) |
V |
getInstance(K key) |
V |
remove(K key) |
Collection<V> |
values() |
public SingletonMap(SingletonMap.Builder<K,V> builder)
public SingletonMap(SingletonMap.Builder<K,V> builder, long maxAge)
builder - maxAge - map内对象的最大存在时长,单位为毫秒Copyright © 2018. All rights reserved.