/** Creates a Builder by copying an existing AlternateCoordinate instance */ private Builder(org.opencb.biodata.models.variant.avro.AlternateCoordinate other) { super(org.opencb.biodata.models.variant.avro.AlternateCoordinate.SCHEMA$); if (isValidValue(fields()[0], other.chromosome)) { this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.start)) { this.start = data().deepCopy(fields()[1].schema(), other.start); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.end)) { this.end = data().deepCopy(fields()[2].schema(), other.end); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.reference)) { this.reference = data().deepCopy(fields()[3].schema(), other.reference); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.alternate)) { this.alternate = data().deepCopy(fields()[4].schema(), other.alternate); fieldSetFlags()[4] = true; } if (isValidValue(fields()[5], other.type)) { this.type = data().deepCopy(fields()[5].schema(), other.type); fieldSetFlags()[5] = true; } }
@Override public AlternateCoordinate build() { try { AlternateCoordinate record = new AlternateCoordinate(); record.chromosome = fieldSetFlags()[0] ? this.chromosome : (java.lang.String) defaultValue(fields()[0]); record.start = fieldSetFlags()[1] ? this.start : (java.lang.Integer) defaultValue(fields()[1]); record.end = fieldSetFlags()[2] ? this.end : (java.lang.Integer) defaultValue(fields()[2]); record.reference = fieldSetFlags()[3] ? this.reference : (java.lang.String) defaultValue(fields()[3]); record.alternate = fieldSetFlags()[4] ? this.alternate : (java.lang.String) defaultValue(fields()[4]); record.type = fieldSetFlags()[5] ? this.type : (org.opencb.biodata.models.variant.avro.VariantType) defaultValue(fields()[5]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Checks whether the 'type' field has been set */ public boolean hasType() { return fieldSetFlags()[5]; }
/** Checks whether the 'alternate' field has been set */ public boolean hasAlternate() { return fieldSetFlags()[4]; }
/** Checks whether the 'end' field has been set */ public boolean hasEnd() { return fieldSetFlags()[2]; }
/** Clears the value of the 'alternate' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearAlternate() { alternate = null; fieldSetFlags()[4] = false; return this; }
/** Sets the value of the 'alternate' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setAlternate(java.lang.String value) { validate(fields()[4], value); this.alternate = value; fieldSetFlags()[4] = true; return this; }
/** Sets the value of the 'end' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setEnd(java.lang.Integer value) { validate(fields()[2], value); this.end = value; fieldSetFlags()[2] = true; return this; }
/** Clears the value of the 'start' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearStart() { start = null; fieldSetFlags()[1] = false; return this; }
/** Clears the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearChromosome() { chromosome = null; fieldSetFlags()[0] = false; return this; }
/** Sets the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setChromosome(java.lang.String value) { validate(fields()[0], value); this.chromosome = value; fieldSetFlags()[0] = true; return this; }
/** Checks whether the 'reference' field has been set */ public boolean hasReference() { return fieldSetFlags()[3]; }
/** Checks whether the 'start' field has been set */ public boolean hasStart() { return fieldSetFlags()[1]; }
/** Clears the value of the 'reference' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearReference() { reference = null; fieldSetFlags()[3] = false; return this; }
/** Sets the value of the 'reference' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setReference(java.lang.String value) { validate(fields()[3], value); this.reference = value; fieldSetFlags()[3] = true; return this; }
/** Clears the value of the 'end' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearEnd() { end = null; fieldSetFlags()[2] = false; return this; }
/** Sets the value of the 'type' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setType(org.opencb.biodata.models.variant.avro.VariantType value) { validate(fields()[5], value); this.type = value; fieldSetFlags()[5] = true; return this; }
/** Sets the value of the 'start' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder setStart(java.lang.Integer value) { validate(fields()[1], value); this.start = value; fieldSetFlags()[1] = true; return this; }
/** Checks whether the 'chromosome' field has been set */ public boolean hasChromosome() { return fieldSetFlags()[0]; }
/** Clears the value of the 'type' field */ public org.opencb.biodata.models.variant.avro.AlternateCoordinate.Builder clearType() { type = null; fieldSetFlags()[5] = false; return this; }