Documentation of 'visad.data.netcdf.Quantity' Java class
Quantity
visad.data.netcdf

Class Quantity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable


    public class Quantity
    extends RealType
    The following class represents a quantity -- usually a physical one such as energy, viscosity, or velocity (although an artificial one such as "money" should be possible). It extends RealType by carrying around a preferred unit as a string because a Unit is useless for doing that. A Quantity is immutable.
    See Also:
    Serialized Form
    • Constructor Detail

      • Quantity

        public Quantity(java.lang.String name,
                        java.lang.String unitSpec,
                        SimpleSet set)
                 throws VisADException,
                        ParseException
        Constructs from a name, a unit specification, and a sample set.
        Parameters:
        name - The name of the quantity (e.g. "length").
        unitSpec - The preferred unit for the quantity (e.g. "feet").
        set - The default sample set for the quantity. May be null.
        Throws:
        ParseException - Couldn't decode unit specification.
        VisADException - ScalarType of same name already exists.
      • Quantity

        public Quantity(java.lang.String name,
                        java.lang.String unitSpec)
                 throws VisADException,
                        ParseException
        Constructs from a name and a unit specification.
        Parameters:
        name - The name of the quantity (e.g. "length").
        unitSpec - The preferred unit for the quantity (e.g. "feet").
        Throws:
        VisADException - Can't create necessary VisAD object.
        ParseException - Couldn't decode unit specification.
    • Method Detail

      • getDefaultUnitString

        public java.lang.String getDefaultUnitString()
        Return the default unit of this quantity as a string.
        Returns:
        The default unit of this quantity or null if no such unit.
      • getQuantity

        public static Quantity getQuantity(java.lang.String name,
                                           java.lang.String unitSpec)
                                    throws ParseException
        create a new Quantity, or return it if it already exists
        Throws:
        ParseException
      • getQuantityByName

        public static Quantity getQuantityByName(java.lang.String name)
        return any Quantity constructed in this JVM with name, or null

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.