/** Creates a Builder by copying an existing BreakendMate instance */ private Builder(org.opencb.biodata.models.variant.avro.BreakendMate other) { super(org.opencb.biodata.models.variant.avro.BreakendMate.SCHEMA$); if (isValidValue(fields()[0], other.chromosome)) { this.chromosome = data().deepCopy(fields()[0].schema(), other.chromosome); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.position)) { this.position = data().deepCopy(fields()[1].schema(), other.position); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.ciPositionLeft)) { this.ciPositionLeft = data().deepCopy(fields()[2].schema(), other.ciPositionLeft); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.ciPositionRight)) { this.ciPositionRight = data().deepCopy(fields()[3].schema(), other.ciPositionRight); fieldSetFlags()[3] = true; } }
/** Creates a Builder by copying an existing Builder */ private Builder(org.opencb.biodata.models.variant.avro.BreakendMate.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.position)) { this.position = data().deepCopy(fields()[1].schema(), other.position); fieldSetFlags()[1] = true; } if (isValidValue(fields()[2], other.ciPositionLeft)) { this.ciPositionLeft = data().deepCopy(fields()[2].schema(), other.ciPositionLeft); fieldSetFlags()[2] = true; } if (isValidValue(fields()[3], other.ciPositionRight)) { this.ciPositionRight = data().deepCopy(fields()[3].schema(), other.ciPositionRight); fieldSetFlags()[3] = true; } }
@Override public BreakendMate build() { try { BreakendMate record = new BreakendMate(); record.chromosome = fieldSetFlags()[0] ? this.chromosome : (java.lang.String) defaultValue(fields()[0]); record.position = fieldSetFlags()[1] ? this.position : (java.lang.Integer) defaultValue(fields()[1]); record.ciPositionLeft = fieldSetFlags()[2] ? this.ciPositionLeft : (java.lang.Integer) defaultValue(fields()[2]); record.ciPositionRight = fieldSetFlags()[3] ? this.ciPositionRight : (java.lang.Integer) defaultValue(fields()[3]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }
/** Checks whether the 'ciPositionLeft' field has been set */ public boolean hasCiPositionLeft() { return fieldSetFlags()[2]; }
/** Checks whether the 'position' field has been set */ public boolean hasPosition() { return fieldSetFlags()[1]; }
/** Checks whether the 'chromosome' field has been set */ public boolean hasChromosome() { return fieldSetFlags()[0]; }
/** Sets the value of the 'ciPositionRight' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setCiPositionRight(java.lang.Integer value) { validate(fields()[3], value); this.ciPositionRight = value; fieldSetFlags()[3] = true; return this; }
/** Sets the value of the 'position' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setPosition(java.lang.Integer value) { validate(fields()[1], value); this.position = value; fieldSetFlags()[1] = true; return this; }
/** Checks whether the 'ciPositionRight' field has been set */ public boolean hasCiPositionRight() { return fieldSetFlags()[3]; }
/** Clears the value of the 'ciPositionRight' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearCiPositionRight() { ciPositionRight = null; fieldSetFlags()[3] = false; return this; }
/** Sets the value of the 'ciPositionLeft' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setCiPositionLeft(java.lang.Integer value) { validate(fields()[2], value); this.ciPositionLeft = value; fieldSetFlags()[2] = true; return this; }
/** Clears the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearChromosome() { chromosome = null; fieldSetFlags()[0] = false; return this; }
/** Sets the value of the 'chromosome' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder setChromosome(java.lang.String value) { validate(fields()[0], value); this.chromosome = value; fieldSetFlags()[0] = true; return this; }
/** Clears the value of the 'ciPositionLeft' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearCiPositionLeft() { ciPositionLeft = null; fieldSetFlags()[2] = false; return this; }
/** Clears the value of the 'position' field */ public org.opencb.biodata.models.variant.avro.BreakendMate.Builder clearPosition() { position = null; fieldSetFlags()[1] = false; return this; }