/** * Copy constructor that converts the given {@link omero.model.ElectricPotential} * based on the given ome.model enum */ public ElectricPotentialI(double d, ome.model.enums.UnitsElectricPotential ul) { this(d, UnitsElectricPotential.valueOf(ul.toString())); }
public static String xmlElectricPotentialEnumToOMERO(String xml) { return ome.model.enums.UnitsElectricPotential.bySymbol(xml).toString(); }
@Override public void copyObject(Filterable model, ModelMapper mapper) { if (model instanceof ome.model.units.ElectricPotential) { ome.model.units.ElectricPotential t = (ome.model.units.ElectricPotential) model; this.value = t.getValue(); this.unit = UnitsElectricPotential.valueOf(t.getUnit().toString()); } else { throw new IllegalArgumentException( "ElectricPotential cannot copy from " + (model==null ? "null" : model.getClass().getName())); } }
/** * Copy constructor that converts the given {@link omero.model.ElectricPotential} * based on the given ome-xml enum */ public ElectricPotentialI(ElectricPotential value, Unit<ome.units.quantity.ElectricPotential> ul) throws BigResult { this(value, ome.model.enums.UnitsElectricPotential.bySymbol(ul.getSymbol()).toString()); }
public static String xmlElectricPotentialEnumToOMERO( Unit<ome.units.quantity.ElectricPotential> xml) { return ome.model.enums.UnitsElectricPotential.bySymbol( xml.getSymbol()).toString(); }
/** * Convert a Bio-Formats {@link Length} to an OMERO Length. */ public ElectricPotentialI(ome.units.quantity.ElectricPotential value) { ome.model.enums.UnitsElectricPotential internal = ome.model.enums.UnitsElectricPotential.bySymbol(value.unit().getSymbol()); UnitsElectricPotential ul = UnitsElectricPotential.valueOf(internal.toString()); setValue(value.value().doubleValue()); setUnit(ul); }