mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change] 调整CollectionCacheStore泛型声明以更好的开发对应实现;
[Change] CollectionCacheStore 增加 "C (Collection)" 泛型标记, 使下级接口能具体声明其 Collection 的具体类型; [Change] ListCacheStore, SetCacheStore 适配更改;
This commit is contained in:
parent
e98fd82916
commit
3ecaf4db67
@ -24,7 +24,7 @@ import java.util.Collection;
|
|||||||
* @param <E> 元素类型.
|
* @param <E> 元素类型.
|
||||||
* @author LamGC
|
* @author LamGC
|
||||||
*/
|
*/
|
||||||
public interface CollectionCacheStore<E> extends CacheStore<Collection<E>> {
|
public interface CollectionCacheStore<E, C extends Collection<E>> extends CacheStore<C> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 为缓存项添加一个元素.
|
* 为缓存项添加一个元素.
|
||||||
|
@ -25,7 +25,7 @@ import java.util.List;
|
|||||||
* @param <E> 值类型.
|
* @param <E> 值类型.
|
||||||
* @author LamGC
|
* @author LamGC
|
||||||
*/
|
*/
|
||||||
public interface ListCacheStore<E> extends CollectionCacheStore<E> {
|
public interface ListCacheStore<E> extends CollectionCacheStore<E, List<E>> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取缓存项中的指定元素.
|
* 获取缓存项中的指定元素.
|
||||||
|
@ -24,7 +24,7 @@ import java.util.Set;
|
|||||||
* @param <E> 值类型.
|
* @param <E> 值类型.
|
||||||
* @author LamGC
|
* @author LamGC
|
||||||
*/
|
*/
|
||||||
public interface SetCacheStore<E> extends CollectionCacheStore<E> {
|
public interface SetCacheStore<E> extends CollectionCacheStore<E, Set<E>> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user