diff --git a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/CollectionCacheStore.java b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/CollectionCacheStore.java index c6e5010..338d85a 100644 --- a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/CollectionCacheStore.java +++ b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/CollectionCacheStore.java @@ -30,30 +30,30 @@ public interface CollectionCacheStore extends CacheStore> { * 为缓存项添加一个元素. * 当缓存项不存在时, 将会创建一个新的缓存项. * @param key 缓存项键名. - * @param value 待添加的元素. + * @param element 待添加的元素. * @return 如果成功返回 true. - * @throws NullPointerException 当 key 或 value 为 null 时抛出; 本方法不允许存储 null 值, 因为 null 代表"没有/不存在". + * @throws NullPointerException 当 key 或 element 为 null 时抛出; 本方法不允许存储 null 值, 因为 null 代表"没有/不存在". */ - boolean addElement(String key, E value); + boolean addElement(String key, E element); /** * 为缓存项添加一组元素. * 当缓存项不存在时, 将会创建一个新的缓存项. * @param key 缓存项键名. - * @param values 欲添加的元素集合. + * @param elements 欲添加的元素集合. * @return 如果成功添加, 返回 true, 如果无法添加(例如缓存项 List/Set 长度限制), 返回 false. * @throws NullPointerException 当 key 或 value 为 null 时抛出; 本方法不允许存储 null 值, 因为 null 代表"没有/不存在". */ - boolean addElements(String key, Collection values); + boolean addElements(String key, Collection elements); /** * 检查指定元素是否包含在指定缓存项中. * @param key 待检查的缓存项键名. - * @param value 待查找的缓存值. + * @param element 待查找的缓存值. * @return 如果存在, 返回 true, 如果元素不存在, 或缓存项不存在, 返回 false. - * @throws NullPointerException 当 key 或 value 为 null 时抛出; 本方法不允许存储 null 值, 因为 null 代表"没有/不存在". + * @throws NullPointerException 当 key 或 element 为 null 时抛出; 本方法不允许存储 null 值, 因为 null 代表"没有/不存在". */ - boolean containsElement(String key, E value); + boolean containsElement(String key, E element); /** * 检查指定缓存项是否为空. diff --git a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/ListCacheStore.java b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/ListCacheStore.java index 533f99c..cae4923 100644 --- a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/ListCacheStore.java +++ b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/ListCacheStore.java @@ -25,7 +25,7 @@ import java.util.List; * @param 值类型. * @author LamGC */ -public interface ListCacheStore extends CollectionCacheStore> { +public interface ListCacheStore extends CollectionCacheStore { /** * 获取缓存项中的指定元素. @@ -68,5 +68,5 @@ public interface ListCacheStore extends CollectionCacheStore> { * @return 如果元素存在且删除成功, 返回 true. */ @Override - boolean removeElement(String key, List element); + boolean removeElement(String key, E element); } diff --git a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/SetCacheStore.java b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/SetCacheStore.java index e7b5495..0299125 100644 --- a/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/SetCacheStore.java +++ b/ContentGrabbingJi-CacheStore-api/src/main/java/net/lamgc/cgj/bot/cache/SetCacheStore.java @@ -24,7 +24,7 @@ import java.util.Set; * @param 值类型. * @author LamGC */ -public interface SetCacheStore extends CollectionCacheStore> { +public interface SetCacheStore extends CollectionCacheStore {