记录类支持:TriageWorkflow.Charge

java.lang.Object
java.lang.Record
com.example.workflows.SupportTriageWorkflow.Charge
Enclosing class:
SupportTriageWorkflow

public static record SupportTriageWorkflow.Charge(String id, String date, String description, int amountCents, String currency) extends Record
客户账户中的一笔费用(或欠款)。
  • 构造函数概述

    Constructors
    Constructor
    Description
    Charge(String id, String date, String description, int amountCents, String currency)
    创建一个……的实例。 Charge 记录类(Record Class)。
  • 方法概述

    Modifier and Type
    Method
    Description
    int
    返回该值的值。 amountCents “record component”(记录组件)。
    返回该值的值。 currency “record component”(记录组件)。
    返回该值的值。 date “record component”(记录组件)。
    返回该值的值。 description “record component”(记录组件)。
    final boolean
    用于表示另一个对象是否“等于”当前这个对象。
    final int
    返回该对象的哈希码值。
    id()
    返回该值的值。 id “record component”(记录组件)。
    final String
    返回该记录类的字符串表示形式。

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 构造函数详细信息

    • Charge

      public Charge(String id, String date, String description, int amountCents, String currency)
      创建一个……的实例。 Charge 记录类(Record Class)。
      Parameters:
      id - the value for the id record component
      date - the value for the date record component
      description - the value for the description record component
      amountCents - the value for the amountCents record component
      currency - the value for the currency record component
  • 方法详细信息(Method Details)

    • toString

      public final String toString()
      返回该记录类的字符串表示形式。该字符串包含类的名称,以及每个记录组件的名称和对应的值。
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      返回该对象的哈希码值。该哈希码值是由该对象中每个组件的哈希码计算得出的。
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。其中,某些特定的组件(称为“引用组件”)也需要被进行比较。 Objects::equals(Object,Object);原始组件(primitive components)会与……进行比较。 compare 这些方法来自它们对应的包装类(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.
    • id

      public String id()
      返回该值的值。 id “record component”(记录组件)。
      Returns:
      the value of the id record component
    • date

      public String date()
      返回该值的值。 date “record component”(记录组件)。
      Returns:
      the value of the date record component
    • description

      public String description()
      返回该值的值。 description “record component”(记录组件)。
      Returns:
      the value of the description record component
    • amountCents

      public int amountCents()
      返回该值的值。 amountCents “record component”(记录组件)。
      Returns:
      the value of the amountCents record component
    • currency

      public String currency()
      返回该值的值。 currency “record component”(记录组件)。
      Returns:
      the value of the currency record component