记录类: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
尝试根据当前的世界状态重新计算剩余的计划。
-
嵌套类概述
Nested classes/interfaces inherited from interface ReplanPolicy
ReplanPolicy.FailStop, ReplanPolicy.Ignore, ReplanPolicy.ReplanModifier and TypeInterfaceDescriptionstatic final record在发生故障时,应立即停止操作并显示错误信息。static final record忽略失败情况,按原计划继续执行剩余的部分。static final record尝试根据当前的世界状态重新计算剩余的计划。 -
构造函数概述
Constructors -
方法概述
Modifier and TypeMethodDescriptionfinal boolean用于表示另一个对象是否“等于”当前这个对象。final inthashCode()返回该对象的哈希码值。int返回该值的值。maxAttempts“record component”(记录组件)。final StringtoString()返回该记录类的字符串表示形式。
-
构造函数详细信息
-
Replan
public Replan(int maxAttempts) 创建一个……的实例。Replan记录类(Record Class)。- Parameters:
maxAttempts- the value for themaxAttemptsrecord component
-
-
方法详细信息(Method Details)
-
toString
-
hashCode
-
equals
用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。该记录类中的所有组件都会被逐一进行比较。compare这些方法来自它们对应的包装类(wrapper classes)。 -
maxAttempts
public int maxAttempts()返回该值的值。maxAttempts“record component”(记录组件)。- Returns:
- the value of the
maxAttemptsrecord component
-