Interface RecordV2Builder
public interface RecordV2Builder
Builds free format
RecordV2 value.
This type of builder may be used to generate free format
RecordV2 format data which is not constrained by a
Schema.
Such a builder can be created using RecordV2DataType.valueBuilder().
- Since:
- 6.0
- Author:
- DiffusionData Limited
-
Method Summary
Modifier and TypeMethodDescriptionAdds one or more field values.addFields(Collection<String> values) Adds one or more field values.Adds a new record comprising the specified field values.addRecord(Collection<String> fields) Adds a new record comprising the specified field values.build()Builds aRecordV2object from the current builder state.clear()Clears all current values from the builder allowing it to be reused to generate new data.
-
Method Details
-
addFields
Adds one or more field values.If there is a current record, this adds the fields to the end of the current record.
- Parameters:
values- field values- Returns:
- this builder
-
addFields
Adds one or more field values.If there is a current record, this adds the fields to the end of the current record.
- Parameters:
values- field values- Returns:
- this builder
-
addRecord
Adds a new record comprising the specified field values.- Parameters:
fields- the fields within the new record. If no fields are supplied, an empty record will be added.- Returns:
- this builder
-
addRecord
Adds a new record comprising the specified field values.- Parameters:
fields- the fields within the new record. If no fields are supplied, an empty record will be added.- Returns:
- this builder
-
clear
RecordV2Builder clear()Clears all current values from the builder allowing it to be reused to generate new data.- Returns:
- this builder
-
build
RecordV2 build()Builds aRecordV2object from the current builder state.- Returns:
- a new
RecordV2object.
-