## visad.data.netcdf
Class QuantityDBImpl.UnitKey

    java.lang.Object
      visad.data.netcdf.QuantityDBImpl.NameKey
          visad.data.netcdf.QuantityDBImpl.UnitKey

All Implemented Interfaces:
  Comparable, Serializable

Enclosing class:
  QuantityDBImpl

protected static final class QuantityDBImpl.UnitKey
extends QuantityDBImpl.NameKey

Provides support for keys to the unit map. Immutable.

See Also:
  Serialized Form

Field Summary
`protected Unit` `unit` The default unit of the quantity.

Constructor Summary
`protected` `QuantityDBImpl.UnitKey(Unit unit, String name)` Constructs from the unit of a quantity and its name.

Method Summary
`int` `compareTo(Object obj)` Compare this key to another (unit first).

Methods inherited from class visad.data.netcdf.QuantityDBImpl.NameKey
`getName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### unit

    protected final Unit unit

  The default unit of the quantity.

Constructor Detail

### QuantityDBImpl.UnitKey

    protected QuantityDBImpl.UnitKey(Unit unit,
                                     String name)

  Constructs from the unit of a quantity and its name.

Parameters:
  `unit` - The default unit of the quantity.
  `name` - The name of the quantity.

Method Detail

### compareTo

    public int compareTo(Object obj)
                  throws ClassCastException

  Compare this key to another (unit first).

  Specified by:
    `compareTo` in interface `Comparable`
  Overrides:
    `compareTo` in class `QuantityDBImpl.NameKey`
  Throws:
    `ClassCastException`