mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-29 22:27:33 +00:00
[Add][Moved] 调整Converter包路径, 增加StringToStringConverter;
[Moved] Converter, StringConverter 调整包路径; [Add] StringToStringConverter 添加简易StringConverter实现; [Change] CacheStoreFactory 适配更改;
This commit is contained in:
parent
6502385641
commit
e98fd82916
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
package net.lamgc.cgj.bot.cache;
|
package net.lamgc.cgj.bot.cache;
|
||||||
|
|
||||||
|
import net.lamgc.cgj.bot.cache.convert.StringConverter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存存储容器构造工厂.
|
* 缓存存储容器构造工厂.
|
||||||
* 可支持不同实现缓存存储容器.
|
* 可支持不同实现缓存存储容器.
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.lamgc.cgj.bot.cache;
|
package net.lamgc.cgj.bot.cache.convert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换器接口
|
* 转换器接口
|
@ -15,7 +15,7 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.lamgc.cgj.bot.cache;
|
package net.lamgc.cgj.bot.cache.convert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 某类型到字符串的转换器接口.
|
* 某类型到字符串的转换器接口.
|
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2020 LamGC
|
||||||
|
*
|
||||||
|
* ContentGrabbingJi is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* ContentGrabbingJi is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.lamgc.cgj.bot.cache.convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字符串原样转换的转换器.
|
||||||
|
* 不进行任何处理.
|
||||||
|
* @author LamGC
|
||||||
|
*/
|
||||||
|
public class StringToStringConverter implements StringConverter<String> {
|
||||||
|
@Override
|
||||||
|
public String to(String source) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String from(String target) {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user