.
This commit is contained in:
29
docs/oth/type-token.md
Normal file
29
docs/oth/type-token.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# IType
|
||||
|
||||
> IType 中实现的 TypeToken
|
||||
|
||||
```java
|
||||
package dev.zhub;
|
||||
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IType {
|
||||
TypeToken<String> STRING = new TypeToken<String>() {};
|
||||
TypeToken<Short> SHORT = new TypeToken<Short>() {};
|
||||
TypeToken<Integer> INT = new TypeToken<Integer>() {};
|
||||
TypeToken<Long> LONG = new TypeToken<Long>() {};
|
||||
TypeToken<Double> DOUBLE = new TypeToken<Double>() {};
|
||||
TypeToken<Map<String, String>> MAP = new TypeToken<Map<String, String>>() {};
|
||||
TypeToken<List<Map<String, String>>> LMAP = new TypeToken<List<Map<String, String>>>() {};
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user