@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("quantity")) { this.quantity = castToRatio(value); // Ratio } else if (name.equals("substance[x]")) { this.substance = castToType(value); // Type } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(String name, Base value) throws FHIRException { if (name.equals("quantity")) { this.quantity = castToRatio(value); // Ratio } else if (name.equals("substance[x]")) { this.substance = castToType(value); // Type } else return super.setProperty(name, value); return value; }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1285004149: // quantity this.quantity = castToRatio(value); // Ratio return value; case 530040176: // substance this.substance = castToType(value); // Type return value; default: return super.setProperty(hash, name, value); } }
@Override public Base setProperty(int hash, String name, Base value) throws FHIRException { switch (hash) { case -1285004149: // quantity this.quantity = castToRatio(value); // Ratio return value; case 530040176: // substance this.substance = castToType(value); // Type return value; default: return super.setProperty(hash, name, value); } }