Record Class PredefinedField.WithGenerator
java.lang.Object
java.lang.Record
org.elasticsearch.datageneration.fields.PredefinedField.WithGenerator
- All Implemented Interfaces:
PredefinedField
- Enclosing interface:
PredefinedField
public static record PredefinedField.WithGenerator(String name, FieldType fieldType, Map<String,Object> mapping, FieldDataGenerator generator)
extends Record
implements PredefinedField
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.datageneration.fields.PredefinedField
PredefinedField.WithGenerator -
Constructor Summary
ConstructorsConstructorDescriptionWithGenerator(String name, FieldType fieldType, Map<String, Object> mapping, FieldDataGenerator generator) Creates an instance of aWithGeneratorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefieldTyperecord component.Returns the value of thegeneratorrecord component.generator(DataSource dataSource) final inthashCode()Returns a hash code value for this object.mapping()Returns the value of themappingrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WithGenerator
public WithGenerator(String name, FieldType fieldType, Map<String, Object> mapping, FieldDataGenerator generator) Creates an instance of aWithGeneratorrecord class.- Parameters:
name- the value for thenamerecord componentfieldType- the value for thefieldTyperecord componentmapping- the value for themappingrecord componentgenerator- the value for thegeneratorrecord component
-
-
Method Details
-
generator
- Specified by:
generatorin interfacePredefinedField
-
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.- Specified by:
namein interfacePredefinedField- Returns:
- the value of the
namerecord component
-
fieldType
Returns the value of thefieldTyperecord component.- Specified by:
fieldTypein interfacePredefinedField- Returns:
- the value of the
fieldTyperecord component
-
mapping
Returns the value of themappingrecord component.- Specified by:
mappingin interfacePredefinedField- Returns:
- the value of the
mappingrecord component
-
generator
Returns the value of thegeneratorrecord component.- Returns:
- the value of the
generatorrecord component
-