+ update TSerializer
This commit is contained in:
parent
720ff96ac9
commit
4bf37340bc
@ -6,12 +6,15 @@ package me.skymc.taboolib.common.serialize;
|
||||
*/
|
||||
public interface TSerializable {
|
||||
|
||||
void read(String fieldName, String value);
|
||||
default void read(String fieldName, String value) {
|
||||
}
|
||||
|
||||
String write(String fieldName, Object value);
|
||||
default String write(String fieldName, Object value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
default void read(String value) {
|
||||
TSerializer.read(this, value);
|
||||
default Object read(String value) {
|
||||
return TSerializer.read(this, value);
|
||||
}
|
||||
|
||||
default String write() {
|
||||
|
@ -8,7 +8,7 @@ public interface TSerializerElement<T> {
|
||||
|
||||
T read(String value);
|
||||
|
||||
String write(Object value);
|
||||
String write(T value);
|
||||
|
||||
boolean matches(Class objectClass);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user