Class NamedToolPredicate

java.lang.Object
com.google.adk.tools.NamedToolPredicate
All Implemented Interfaces:
ToolPredicate

public class NamedToolPredicate extends Object implements ToolPredicate
  • Constructor Details

    • NamedToolPredicate

      public NamedToolPredicate(List<String> toolNames)
    • NamedToolPredicate

      public NamedToolPredicate(String... toolNames)
  • Method Details

    • test

      public boolean test(BaseTool tool, Optional<ReadonlyContext> readonlyContext)
      Description copied from interface: ToolPredicate
      Decides if the given tool is selected.
      Specified by:
      test in interface ToolPredicate
      Parameters:
      tool - The tool to check.
      readonlyContext - The current context.
      Returns:
      true if the tool should be selected, false otherwise.