On Tue, Jan 6, 2015 at 1:33 PM, Maulik Gandhi <[email protected]> wrote:
> I was wondering if adding a functionality of clearing all fields on Record,
> makes sense or not?
> I was wondering if adding a functionality of reseting all fields to default
> value (the default value would be what has been defined in AVDL) on Record,
> makes sense or not?

These both seem reasonable to me.

The simplest thing to do is to clear the fieldSetFlags.  This could be
done with a method on RecordBuilderBase, something like (untested):

public void reset() {
  Arrays.fill(fieldSetFlags(), false);
}

The builder uses default values for fields that have not been set.

Doug

Reply via email to