Record Class CloneContext.CloneStatistics
java.lang.Object
java.lang.Record
cloud.opencode.base.deepclone.CloneContext.CloneStatistics
- Record Components:
objectsCloned- number of objects cloned | 克隆的对象数objectsSkipped- number of objects skipped (immutable) | 跳过的对象数(不可变)maxDepthReached- maximum depth reached | 达到的最大深度elapsedNanos- elapsed time in nanoseconds | 经过的纳秒时间
- Enclosing class:
CloneContext
public static record CloneContext.CloneStatistics(int objectsCloned, int objectsSkipped, int maxDepthReached, long elapsedNanos)
extends Record
Clone statistics record
克隆统计信息记录
- Since:
- JDK 25, opencode-base-deepclone V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionCloneStatistics(int objectsCloned, int objectsSkipped, int maxDepthReached, long elapsedNanos) Creates an instance of aCloneStatisticsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets elapsed time in milliseconds 获取经过的毫秒时间longReturns the value of theelapsedNanosrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxDepthReachedrecord component.intReturns the value of theobjectsClonedrecord component.intReturns the value of theobjectsSkippedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CloneStatistics
public CloneStatistics(int objectsCloned, int objectsSkipped, int maxDepthReached, long elapsedNanos) Creates an instance of aCloneStatisticsrecord class.- Parameters:
objectsCloned- the value for theobjectsClonedrecord componentobjectsSkipped- the value for theobjectsSkippedrecord componentmaxDepthReached- the value for themaxDepthReachedrecord componentelapsedNanos- the value for theelapsedNanosrecord component
-
-
Method Details
-
elapsedMillis
public double elapsedMillis()Gets elapsed time in milliseconds 获取经过的毫秒时间- Returns:
- elapsed milliseconds | 经过的毫秒
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
objectsCloned
public int objectsCloned()Returns the value of theobjectsClonedrecord component.- Returns:
- the value of the
objectsClonedrecord component
-
objectsSkipped
public int objectsSkipped()Returns the value of theobjectsSkippedrecord component.- Returns:
- the value of the
objectsSkippedrecord component
-
maxDepthReached
public int maxDepthReached()Returns the value of themaxDepthReachedrecord component.- Returns:
- the value of the
maxDepthReachedrecord component
-
elapsedNanos
public long elapsedNanos()Returns the value of theelapsedNanosrecord component.- Returns:
- the value of the
elapsedNanosrecord component
-