E - Epublic class Recently<E> extends AbstractMap<java.time.LocalDateTime,E>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 限定符和类型 | 字段和说明 |
|---|---|
static Tuple2<AtomicInteger,AtomicLong> |
INSTANCE_CNT |
| 构造器和说明 |
|---|
Recently() |
Recently(int capacity)
使用2的幂作为容量,将更有效利用内存空间。
|
Recently(int capacity,
java.util.function.BiFunction<Long,E,Map.Entry<Long,E>> map)
探索:为了方便内存分析,允许标记
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> Recently<T> |
empty() |
Set<Map.Entry<java.time.LocalDateTime,E>> |
entrySet() |
void |
forEach(long limit,
java.util.function.BiConsumer<java.time.LocalDateTime,E> action) |
E |
push(E e) |
long |
pushTimes() |
Map.Entry<java.time.LocalDateTime,E>[] |
toArray() |
String |
toString() |
String |
toString(long limit) |
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, valuescompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static final Tuple2<AtomicInteger,AtomicLong> INSTANCE_CNT
public Recently()
public Recently(int capacity)
capacity - 容量public static <T> Recently<T> empty()
public void forEach(long limit,
java.util.function.BiConsumer<java.time.LocalDateTime,E> action)
public long pushTimes()
public String toString()
toString 在类中 AbstractMap<java.time.LocalDateTime,E>public String toString(long limit)
Copyright © 2022. All rights reserved.