Class OptionalHandler
java.lang.Object
cloud.opencode.base.deepclone.handler.OptionalHandler
- All Implemented Interfaces:
TypeHandler<Optional>
Type handler for Optional values
Optional值的类型处理器
Deep clones the content of an Optional, preserving the empty/present state.
深度克隆Optional的内容,保持空/存在状态。
- Since:
- JDK 25, opencode-base-deepclone V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OptionalHandler
public OptionalHandler()
-
-
Method Details
-
clone
Description copied from interface:TypeHandlerClones the object 克隆对象- Specified by:
clonein interfaceTypeHandler<Optional>- Parameters:
original- the original object | 原始对象cloner- the cloner for recursive cloning | 用于递归克隆的克隆器context- the clone context | 克隆上下文- Returns:
- the cloned object | 克隆的对象
-
supports
Description copied from interface:TypeHandlerChecks if this handler supports the given type 检查此处理器是否支持给定类型- Specified by:
supportsin interfaceTypeHandler<Optional>- Parameters:
type- the type to check | 要检查的类型- Returns:
- true if supported | 如果支持返回true
-
priority
public int priority()Description copied from interface:TypeHandlerGets the priority of this handler 获取此处理器的优先级Lower values indicate higher priority. Default is 100.
较小的值表示较高的优先级。默认值为100。
- Specified by:
priorityin interfaceTypeHandler<Optional>- Returns:
- the priority | 优先级
-