Record Class McpCompleteCompletion
- 记录组件:
values- the list of completion values, may be nulltotal- the total number of available completions, may be nullhasMore- true if more completions are available, false otherwise
This record encapsulates the response data for completion requests, including the list of completion values, total count, and whether more results are available. The class is designed to be immutable and provides defensive copying to protect internal state from external modification.
- 作者:
- codeboyzhou
-
嵌套类概要
嵌套类 -
构造器概要
构造器构造器说明McpCompleteCompletion(List<String> values, Integer total, boolean hasMore) Compact constructor that creates a defensive copy of the values list. -
方法概要
修饰符和类型方法说明builder()Creates a newMcpCompleteCompletion.Builderinstance for constructingMcpCompleteCompletionobjects.static McpCompleteCompletionempty()Creates an emptyMcpCompleteCompletioninstance.final boolean指示某个其他对象是否“等于”此对象。final inthashCode()返回此对象的哈希代码值。booleanhasMore()返回hasMore记录组件的值。final StringtoString()返回此记录的字符串表示形式。total()返回total记录组件的值。values()返回values记录组件的值。
-
构造器详细资料
-
McpCompleteCompletion
Compact constructor that creates a defensive copy of the values list.This constructor ensures that the internal list cannot be modified from outside the record by creating an immutable copy using
List.copyOf(Collection). If the input list is null, it remains null to preserve the original intent.- 参数:
values- the input list of completion values to be defensively copied
-
-
方法详细资料
-
builder
Creates a newMcpCompleteCompletion.Builderinstance for constructingMcpCompleteCompletionobjects.This factory method provides a convenient way to create a builder for step-by-step construction of completion results using the builder pattern.
- 返回:
- a new
McpCompleteCompletion.Builderinstance
-
empty
Creates an emptyMcpCompleteCompletioninstance.This factory method returns a completion result with no values, zero total count, and no more results available. Useful as a default or placeholder completion.
- 返回:
- an empty
McpCompleteCompletioninstance
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)对参考组件进行比较;使用 '==' 对基元组件进行比较 -
values
返回values记录组件的值。- 返回:
values记录组件的值
-
total
返回total记录组件的值。- 返回:
total记录组件的值
-
hasMore
public boolean hasMore()返回hasMore记录组件的值。- 返回:
hasMore记录组件的值
-