记录类:ReplanPolicy.Replan

java.lang.Object
java.lang.Record
com.google.adk.planner.goap.ReplanPolicy.Replan
Record Components:
maxAttempts - maximum number of consecutive replan attempts before falling back to fail-stop. Must be >= 1.
All Implemented Interfaces:
ReplanPolicy
Enclosing interface:
ReplanPolicy

public static record ReplanPolicy.Replan(int maxAttempts) extends Record implements ReplanPolicy
尝试根据当前的世界状态重新计算剩余的计划。
  • 构造函数详细信息

    • Replan

      public Replan(int maxAttempts)
      创建一个……的实例。 Replan 记录类(Record Class)。
      Parameters:
      maxAttempts - the value for the maxAttempts 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)
      用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。该记录类中的所有组件都会被逐一进行比较。 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.
    • maxAttempts

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