Class ToolParameter
java.lang.Object
org.snmp4j.mcp.tool.ToolParameter
Describes a parameter that can be passed to a tool.
- Since:
- 0.0.1
- Version:
- 0.1.0
- Author:
- SNMP4J.org
-
Constructor Summary
ConstructorsConstructorDescriptionToolParameter(String name, String description, boolean required, Class<?> type) Creates a new tool parameter.ToolParameter(String name, String description, boolean required, Class<?> type, Object defaultValue) Creates a new tool parameter with a default value. -
Method Summary
-
Constructor Details
-
ToolParameter
-
ToolParameter
public ToolParameter(String name, String description, boolean required, Class<?> type, Object defaultValue) Creates a new tool parameter with a default value.- Parameters:
name- the parameter namedescription- the parameter descriptionrequired- whether the parameter is requiredtype- the parameter typedefaultValue- the default value
-
-
Method Details
-
getName
-
getDescription
-
isRequired
public boolean isRequired()Checks if the parameter is required.- Returns:
- true if the parameter is required, false otherwise
-
getType
-
getDefaultValue
Gets the default value.- Returns:
- the default value, or null if there is no default
-