Record Class Template
java.lang.Object
java.lang.Record
org.elasticsearch.logsdb.datageneration.Template
- Record Components:
template- actual template data
public record Template(Map<String,org.elasticsearch.logsdb.datageneration.Template.Entry> template)
extends Record
A template used to generate mapping and documents for a test.
Template encodes object structure, names of objects/fields and type of leaf fields.
Having such a template allow to create interchangeable random mappings with different parameters
but the same structure in order to f.e. test introduction of a new parameter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.template()Returns the value of thetemplaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Template
Creates an instance of aTemplaterecord class.- Parameters:
template- the value for thetemplaterecord component
-
-
Method Details
-
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). -
template
Returns the value of thetemplaterecord component.- Returns:
- the value of the
templaterecord component
-