/** Creates a Builder by copying an existing Cytoband instance */ private Builder(org.opencb.biodata.models.variant.avro.Cytoband other) { super(org.opencb.biodata.models.variant.avro.Cytoband.SCHEMA$); if (isValidValue(fields()[0], other.chromosome)) { this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.stain)) { this.stain = data().deepCopy(fields()[1].schema(), other.stain); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.name)) { this.name = data().deepCopy(fields()[2].schema(), other.name); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.start)) { this.start = data().deepCopy(fields()[3].schema(), other.start); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.end)) { this.end = data().deepCopy(fields()[4].schema(), other.end); fieldSetFlags()[4] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.avro.Cytoband.Builder other) { super(other); if (isValidValue(fields()[0], other.chromosome)) { this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.stain)) { this.stain = data().deepCopy(fields()[1].schema(), other.stain); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.name)) { this.name = data().deepCopy(fields()[2].schema(), other.name); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.start)) { this.start = data().deepCopy(fields()[3].schema(), other.start); fieldSetFlags()[3] = true; } if (isValidValue(fields()[4], other.end)) { this.end = data().deepCopy(fields()[4].schema(), other.end); fieldSetFlags()[4] = true; } }
@Override public Cytoband build() { try { Cytoband record = new Cytoband(); record.chromosome = fieldSetFlags()[0] ? this.chromosome : (java.lang.String) defaultValue(fields()[0]); record.stain = fieldSetFlags()[1] ? this.stain : (java.lang.String) defaultValue(fields()[1]); record.name = fieldSetFlags()[2] ? this.name : (java.lang.String) defaultValue(fields()[2]); record.start = fieldSetFlags()[3] ? this.start : (java.lang.Integer) defaultValue(fields()[3]); record.end = fieldSetFlags()[4] ? this.end : (java.lang.Integer) defaultValue(fields()[4]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Checks whether the 'end' field has been set */ public boolean hasEnd() { return fieldSetFlags()[4]; }
/** Checks whether the 'stain' field has been set */ public boolean hasStain() { return fieldSetFlags()[1]; }
/** Checks whether the 'start' field has been set */ public boolean hasStart() { return fieldSetFlags()[3]; }
/** Checks whether the 'name' field has been set */ public boolean hasName() { return fieldSetFlags()[2]; }
/** Checks whether the 'chromosome' field has been set */ public boolean hasChromosome() { return fieldSetFlags()[0]; }
/** Clears the value of the 'name' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder clearName() { name = null; fieldSetFlags()[2] = false; return this; }
/** Clears the value of the 'stain' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder clearStain() { stain = null; fieldSetFlags()[1] = false; return this; }
/** Clears the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder clearChromosome() { chromosome = null; fieldSetFlags()[0] = false; return this; }
/** Sets the value of the 'start' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder setStart(java.lang.Integer value) { validate(fields()[3], value); this.start = value; fieldSetFlags()[3] = true; return this; }
/** Sets the value of the 'name' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder setName(java.lang.String value) { validate(fields()[2], value); this.name = value; fieldSetFlags()[2] = true; return this; }
/** Sets the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder setChromosome(java.lang.String value) { validate(fields()[0], value); this.chromosome = value; fieldSetFlags()[0] = true; return this; }
/** Sets the value of the 'end' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder setEnd(java.lang.Integer value) { validate(fields()[4], value); this.end = value; fieldSetFlags()[4] = true; return this; }
/** Sets the value of the 'stain' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder setStain(java.lang.String value) { validate(fields()[1], value); this.stain = value; fieldSetFlags()[1] = true; return this; }
/** Clears the value of the 'end' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder clearEnd() { end = null; fieldSetFlags()[4] = false; return this; }
/** Clears the value of the 'start' field */ public org.opencb.biodata.models.variant.avro.Cytoband.Builder clearStart() { start = null; fieldSetFlags()[3] = false; return this; }