## visad.data.units
Interface UnitsDB

All Known Subinterfaces:
  UnitsDB

All Known Implementing Classes:
  DefaultUnitsDB, UnitTable

public interface UnitsDB

The units database interface. This class exists to allow the user to construct their own units database.

Method Summary
`Unit` `get(String name)` Get a unit.
`Enumeration` `getNameEnumeration()` Get an enumeration of the unit names in the database.
`Enumeration` `getSymbolEnumeration()` Get an enumeration of the unit symbols in the database.
`Enumeration` `getUnitEnumeration()` Get an enumeration of the units in the database.
`void` `list()` List the units in the database.
`void` `put(BaseUnit unit)` Adds a base unit.
`void` `putName(String name, Unit unit)` Adds a name and a unit to the name table.
`void` `putSymbol(String symbol, Unit unit)` Adds a symbol and a unit to the symbol table.

Method Detail

### put

    public void put(BaseUnit unit)
             throws IllegalArgumentException

  Adds a base unit.

  Throws:
    `IllegalArgumentException` - The base unit argument is invalid.

### putName

    public void putName(String name,
                        Unit unit)
                 throws IllegalArgumentException

  Adds a name and a unit to the name table.

  Parameters:
    `name` - The name to be added.
    `unit` - The unit to be added.
  Throws:
    `IllegalArgumentException` - Different unit with the same name is already in the table.

### putSymbol

    public void putSymbol(String symbol,
                          Unit unit)
                   throws IllegalArgumentException

  Adds a symbol and a unit to the symbol table.

  Parameters:
    `symbol` - The symbol to be added.
    `unit` - The unit to be added.
  Throws:
    `IllegalArgumentException` - Different unit with the same symbol is already in the table.

### get

    public Unit get(String name)

  Get a unit.

  Parameters:
    `name` - The name of the unit to be retrieved from the database.
  Returns:
    The matching unit entry in the database.

### getNameEnumeration

    public Enumeration getNameEnumeration()

  Get an enumeration of the unit names in the database.

### getSymbolEnumeration

    public Enumeration getSymbolEnumeration()

  Get an enumeration of the unit symbols in the database.

### getUnitEnumeration

    public Enumeration getUnitEnumeration()

  Get an enumeration of the units in the database.

### list

    public void list()

  List the units in the database.