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

    Constructors
    Constructor
    Description
    BatchProgress(int completed, int total, int success, int failure)
    Creates an instance of a BatchProgress record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the completed record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the failure record component.
    double
    Get progress percentage 获取进度百分比
    final int
    Returns a hash code value for this object.
    boolean
    Check if complete 检查是否完成
    int
    Returns the value of the success record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the total record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BatchProgress

      public BatchProgress(int completed, int total, int success, int failure)
      Creates an instance of a BatchProgress record class.
      Parameters:
      completed - the value for the completed record component
      total - the value for the total record component
      success - the value for the success record component
      failure - the value for the failure record component
  • 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • completed

      public int completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • total

      public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • success

      public int success()
      Returns the value of the success record component.
      Returns:
      the value of the success record component
    • failure

      public int failure()
      Returns the value of the failure record component.
      Returns:
      the value of the failure record component