Package com.tnsai.spi
Record Class ToolRegistry.ToolRegistryEntry
java.lang.Object
java.lang.Record
com.tnsai.spi.ToolRegistry.ToolRegistryEntry
- Enclosing interface:
ToolRegistry
public static record ToolRegistry.ToolRegistryEntry(String name, String description, List<ToolRegistry.ToolParameter> parameters, List<String> tags, Map<String,Object> metadata, ToolRegistry.ToolType type)
extends Record
Definition of a tool available to agents.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for ToolRegistryEntry. -
Constructor Summary
ConstructorsConstructorDescriptionToolRegistryEntry(String name, String description, List<ToolRegistry.ToolParameter> parameters, List<String> tags, Map<String, Object> metadata, ToolRegistry.ToolType type) Creates an instance of aToolRegistryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a builder for ToolRegistryEntry.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.Returns the value of theparametersrecord component.tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
ToolRegistryEntry
public ToolRegistryEntry(String name, String description, List<ToolRegistry.ToolParameter> parameters, List<String> tags, Map<String, Object> metadata, ToolRegistry.ToolType type) Creates an instance of aToolRegistryEntryrecord class.- Parameters:
name- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentparameters- the value for theparametersrecord componenttags- the value for thetagsrecord componentmetadata- the value for themetadatarecord componenttype- the value for thetyperecord component
-
-
Method Details
-
builder
Returns a builder for ToolRegistryEntry. -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
parameters
Returns the value of theparametersrecord component.- Returns:
- the value of the
parametersrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-