Record Class TemplateParameter
java.lang.Object
java.lang.Record
zeroecho.core.TemplateParameter
- Record Components:
name- machine-readable parameter name used as the map key (e.g.,"keySizeBits")displayName- human-readable label for UIs and error messagestype- the Java type of the parameter value (e.g.,Integer.class)description- brief description of constraints and purpose
public record TemplateParameter(String name, String displayName, Class<?> type, String description)
extends Record
Describes a single user-supplied parameter accepted by a
ParameterSetDescriptor.Template.
Each TemplateParameter carries presentation metadata and a Java type.
Machine-readable domain constraints, required flags and defaults are exposed
separately by ParameterSetDescriptor.Template.constraints(). Descriptions
explain purpose; clients must not parse them to discover validation rules.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateParameter(String name, String displayName, Class<?> type, String description) Validates the record fields on construction. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.Class<?> type()Returns the value of thetyperecord component.
-
Constructor Details
-
TemplateParameter
Validates the record fields on construction.- Throws:
NullPointerException- if any field isnullIllegalArgumentException- if the name, label or description is blank
-
-
Method Details
-
toString
-
hashCode
-
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
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
type
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-