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

Class QuantityDBImpl

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    StandardQuantityDB


    public class QuantityDBImpl
    extends QuantityDB
    implements java.io.Serializable
    Provides support for a database of quantities. Instances are modifiable.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      QuantityDBImpl(QuantityDB nextDB)
      Constructs with another quantity database as the successor database.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      QuantityDB add(Quantity[] quantities)
      Adds given Quantity-s to the database.
      QuantityDB add(java.lang.String[] definitions, java.lang.String[] aliases)
      Adds the given quantities and aliases to the database.
      void add(java.lang.String name, Quantity quantity)
      Adds a quantity to the database under a given name.
      Quantity get(java.lang.String name)
      Returns the quantity in the database whose name matches a given name.
      Quantity[] get(Unit unit)
      Returns all quantities in the database whose default unit is convertible with a given unit.
      java.util.Iterator nameIterator()
      Returns an iterator of the names in the database.
      java.util.Iterator quantityIterator()
      Returns an iterator of the quantities in the database.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuantityDBImpl

        public QuantityDBImpl(QuantityDB nextDB)
        Constructs with another quantity database as the successor database.
        Parameters:
        nextDB - The quantity database to search after this one. May be null.
    • Method Detail

      • add

        public QuantityDB add(java.lang.String[] definitions,
                              java.lang.String[] aliases)
                       throws ParseException,
                              TypeException,
                              VisADException
        Adds the given quantities and aliases to the database.
        Parameters:
        definitions - New quantities and their definitions. definitions[2*i] contains the name (e.g. "speed") of the quantity whose preferred unit specification (e.g. "m/s") is in definitions[2*i+1].
        aliases - Aliases for quantities. aliases[2*i] contains the alias for the quantity named in aliases[2*i+1].
        Returns:
        The database resulting from the addition. May or may not be the original object.
        Throws:
        ParseException - A unit specification couldn't be parsed.
        TypeException - An incompatible version of the quantity already exists.
        VisADException - Couldn't create necessary VisAD object.
      • add

        public void add(java.lang.String name,
                        Quantity quantity)
                 throws VisADException
        Adds a quantity to the database under a given name.
        Specified by:
        add in class QuantityDB
        Parameters:
        name - The name of the quantity (e.g. "length"). May be an alias for the quantity.
        quantity - The quantity.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • add

        public QuantityDB add(Quantity[] quantities)
                       throws VisADException
        Adds given Quantity-s to the database.
        Parameters:
        quantities - The quantities to be added. The quantity will be added under it own name.
        Returns:
        The database resulting from the addition. May or may not be the original object.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • quantityIterator

        public java.util.Iterator quantityIterator()
        Returns an iterator of the quantities in the database.
        Specified by:
        quantityIterator in class QuantityDB
        Returns:
        An iterator of the quantities in the database.
      • nameIterator

        public java.util.Iterator nameIterator()
        Returns an iterator of the names in the database.
        Specified by:
        nameIterator in class QuantityDB
        Returns:
        An iterator of the names in the database.
      • get

        public Quantity get(java.lang.String name)
        Returns the quantity in the database whose name matches a given name.
        Specified by:
        get in class QuantityDB
        Parameters:
        name - The name of the quantity.
        Returns:
        The quantity in the loal database with name name.
      • get

        public Quantity[] get(Unit unit)
        Returns all quantities in the database whose default unit is convertible with a given unit.
        Specified by:
        get in class QuantityDB
        Parameters:
        unit - The unit of the quantity.
        Returns:
        The quantities in the database whose unit is convertible with unit.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.