Record Class BatchSender.BatchProgress
java.lang.Object
java.lang.Record
cloud.opencode.base.sms.batch.BatchSender.BatchProgress
- Record Components:
completed- completed count | 已完成数total- total count | 总数success- success count | 成功数failure- failure count | 失败数
- Enclosing class:
BatchSender
public static record BatchSender.BatchProgress(int completed, int total, int success, int failure)
extends Record
Batch Progress
批量进度
- Since:
- JDK 25, opencode-base-sms V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionBatchProgress(int completed, int total, int success, int failure) Creates an instance of aBatchProgressrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecompletedrecord component.final booleanIndicates whether some other object is "equal to" this one.intfailure()Returns the value of thefailurerecord component.doubleGet progress percentage 获取进度百分比final inthashCode()Returns a hash code value for this object.booleanCheck if complete 检查是否完成intsuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
Constructor Details
-
BatchProgress
public BatchProgress(int completed, int total, int success, int failure) Creates an instance of aBatchProgressrecord class.
-
-
Method Details
-
getPercentage
public double getPercentage()Get progress percentage 获取进度百分比- Returns:
- the percentage | 百分比
-
isComplete
public boolean isComplete()Check if complete 检查是否完成- Returns:
- true if complete | 如果完成返回true
-
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. -
completed
-
total
-
success
-
failure
-