/** Creates a Builder by copying an existing VariantsByFrequency instance */ private Builder(org.opencb.biodata.models.variant.metadata.VariantsByFrequency other) { super(org.opencb.biodata.models.variant.metadata.VariantsByFrequency.SCHEMA$); if (isValidValue(fields()[0], other.startFrequency)) { this.startFrequency = data().deepCopy(fields()[0].schema(), other.startFrequency); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.endFrequency)) { this.endFrequency = data().deepCopy(fields()[1].schema(), other.endFrequency); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.count)) { this.count = data().deepCopy(fields()[2].schema(), other.count); fieldSetFlags()[2] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.metadata.VariantsByFrequency.Builder other) { super(other); if (isValidValue(fields()[0], other.startFrequency)) { this.startFrequency = data().deepCopy(fields()[0].schema(), other.startFrequency); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.endFrequency)) { this.endFrequency = data().deepCopy(fields()[1].schema(), other.endFrequency); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.count)) { this.count = data().deepCopy(fields()[2].schema(), other.count); fieldSetFlags()[2] = true; } }
@Override public VariantsByFrequency build() { try { VariantsByFrequency record = new VariantsByFrequency(); record.startFrequency = fieldSetFlags()[0] ? this.startFrequency : (java.lang.Float) defaultValue(fields()[0]); record.endFrequency = fieldSetFlags()[1] ? this.endFrequency : (java.lang.Float) defaultValue(fields()[1]); record.count = fieldSetFlags()[2] ? this.count : (java.lang.Integer) defaultValue(fields()[2]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Sets the value of the 'endFrequency' field */ public org.opencb.biodata.models.variant.metadata.VariantsByFrequency.Builder setEndFrequency(float value) { validate(fields()[1], value); this.endFrequency = value; fieldSetFlags()[1] = true; return this; }
/** Sets the value of the 'count' field */ public org.opencb.biodata.models.variant.metadata.VariantsByFrequency.Builder setCount(int value) { validate(fields()[2], value); this.count = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'startFrequency' field */ public org.opencb.biodata.models.variant.metadata.VariantsByFrequency.Builder setStartFrequency(float value) { validate(fields()[0], value); this.startFrequency = value; fieldSetFlags()[0] = true; return this; }