Package omero.model

Class PowerI

  • All Implemented Interfaces:
    Ice.Object, java.io.Serializable, java.lang.Cloneable, ome.model.ModelBased, _PowerOperations, _PowerOperationsNC

    public class PowerI
    extends Power
    implements ome.model.ModelBased
    Blitz wrapper around the Power class. Like Details and Permissions, this object is embedded into other objects and does not have a full life cycle of its own.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Ice.ObjectFactory Factory  
      • Fields inherited from interface Ice.Object

        ice_staticId
    • Constructor Summary

      Constructors 
      Constructor Description
      PowerI()  
      PowerI​(double d, ome.model.enums.UnitsPower ul)
      Copy constructor that converts the given Power based on the given ome.model enum
      PowerI​(double d, ome.units.unit.Unit<ome.units.quantity.Power> unit)  
      PowerI​(double d, UnitsPower unit)  
      PowerI​(ome.units.quantity.Power value)
      Convert a Bio-Formats Length to an OMERO Length.
      PowerI​(Power value, java.lang.String target)
      Copy constructor that converts the given Power based on the given enum string.
      PowerI​(Power value, ome.units.unit.Unit<ome.units.quantity.Power> ul)
      Copy constructor that converts the given Power based on the given ome-xml enum
      PowerI​(Power value, UnitsPower target)
      Copy constructor that converts between units if possible.
    • Field Detail

      • Factory

        public static final Ice.ObjectFactory Factory
    • Constructor Detail

      • PowerI

        public PowerI()
      • PowerI

        public PowerI​(double d,
                      UnitsPower unit)
      • PowerI

        public PowerI​(double d,
                      ome.units.unit.Unit<ome.units.quantity.Power> unit)
      • PowerI

        public PowerI​(Power value,
                      ome.units.unit.Unit<ome.units.quantity.Power> ul)
               throws ome.model.units.BigResult
        Copy constructor that converts the given Power based on the given ome-xml enum
        Throws:
        ome.model.units.BigResult
      • PowerI

        public PowerI​(double d,
                      ome.model.enums.UnitsPower ul)
        Copy constructor that converts the given Power based on the given ome.model enum
      • PowerI

        public PowerI​(Power value,
                      java.lang.String target)
               throws ome.model.units.BigResult
        Copy constructor that converts the given Power based on the given enum string. If either the source or the target unit is null or if no conversion is possible between the two types (e.g. PIXELS), an IllegalArgumentException will be thrown. If the conversion results in an overflow, a BigResult will be thrown, unless the input value was already Infinite or NaN, in which case that will be the return value.
        Parameters:
        target - String representation of the CODE enum
        Throws:
        java.lang.IllegalArgumentException - if the source or target unit is null or an unconvertible type (e.g. PIXELS)
        ome.model.units.BigResult - if the conversion leads to an infinite or NaN result
      • PowerI

        public PowerI​(Power value,
                      UnitsPower target)
               throws ome.model.units.BigResult
        Copy constructor that converts between units if possible.
        Parameters:
        target - unit that is desired. non-null.
        Throws:
        ome.model.units.BigResult
      • PowerI

        public PowerI​(ome.units.quantity.Power value)
        Convert a Bio-Formats Length to an OMERO Length.
    • Method Detail

      • lookupSymbol

        public static java.lang.String lookupSymbol​(UnitsPower unit)
      • makeFactory

        public static final Ice.ObjectFactory makeFactory​(client client)
      • makeXMLUnit

        public static ome.xml.model.enums.UnitsPower makeXMLUnit​(java.lang.String unit)
      • makeXMLQuantity

        public static ome.units.quantity.Power makeXMLQuantity​(double d,
                                                               java.lang.String unit)
      • convert

        public static ome.units.quantity.Power convert​(Power t)
        FIXME: this should likely take a default so that locations which don't want an exception can have log.warn("Using new PositiveFloat(1.0)!", e); return new PositiveFloat(1.0); or similar.
      • getValue

        public double getValue​(Ice.Current current)
        Description copied from interface: _PowerOperations
        Actual value for this unit-based field. The interpretation of the value is only possible along with the UnitsPower enum.
        Specified by:
        getValue in interface _PowerOperations
        Parameters:
        current - The Current object for the invocation.
      • setValue

        public void setValue​(double value,
                             Ice.Current current)
        Specified by:
        setValue in interface _PowerOperations
      • getUnit

        public UnitsPower getUnit​(Ice.Current current)
        Description copied from interface: _PowerOperations
        UnitsPower instance which is an IObject meaning that its ID is sufficient for identifying equality.
        Specified by:
        getUnit in interface _PowerOperations
        Parameters:
        current - The Current object for the invocation.
      • getSymbol

        public java.lang.String getSymbol​(Ice.Current current)
        Description copied from interface: _PowerOperations
        Returns the possibly unicode representation of the ""unit"" value for display.
        Specified by:
        getSymbol in interface _PowerOperations
        Parameters:
        current - The Current object for the invocation.
      • copyObject

        public void copyObject​(ome.util.Filterable model,
                               ome.util.ModelMapper mapper)
        Specified by:
        copyObject in interface ome.model.ModelBased
      • fillObject

        public ome.util.Filterable fillObject​(ome.util.ReverseModelMapper mapper)
        Specified by:
        fillObject in interface ome.model.ModelBased
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object