public class InternKit
extends Object
规范化对象生成工具
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
InternKit
public InternKit()
-
Method Details
-
ofWeak
public static <T> Intern<T> ofWeak()
创建WeakHshMap实现的字符串规范化器
- Type Parameters:
T - 规范对象的类型
- Returns:
Intern
-
ofString
创建JDK默认实现的字符串规范化器
- Returns:
Intern
- See Also:
-
-
of
创建字符串规范化器
- Parameters:
isWeak - 是否创建使用WeakHashMap实现的Interner
- Returns:
Intern