ucar.units
Class UnitDimension

java.lang.Object
  extended by ucar.units.Dimension
      extended by ucar.units.UnitDimension

public final class UnitDimension
extends Dimension


Field Summary
 
Fields inherited from class ucar.units.Dimension
_factors
 
Constructor Summary
UnitDimension()
          Constructs a dimensionless unit dimension.
UnitDimension(BaseUnit baseUnit)
          Constructs the unit dimension corresponding to a base unit.
 
Method Summary
 UnitDimension divideBy(UnitDimension that)
          Divides this unit dimension by another.
 QuantityDimension getQuantityDimension()
          Returns the corresponding quantity dimension.
static void main(String[] args)
          Tests this class.
 UnitDimension multiplyBy(UnitDimension that)
          Multiplies this unit dimension by another.
 UnitDimension raiseTo(int power)
          Raises this unit dimension to a power.
 
Methods inherited from class ucar.units.Dimension
equals, getFactors, getRank, hashCode, isDimensionless, isReciprocalOf, mult, pow, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnitDimension

public UnitDimension()
Constructs a dimensionless unit dimension.


UnitDimension

public UnitDimension(BaseUnit baseUnit)
Constructs the unit dimension corresponding to a base unit.

Parameters:
baseUnit - A base unit.
Method Detail

multiplyBy

public UnitDimension multiplyBy(UnitDimension that)
Multiplies this unit dimension by another.

Parameters:
that - The other unit dimension.
Returns:
The product of this unit dimension multiplied by the other.

divideBy

public UnitDimension divideBy(UnitDimension that)
Divides this unit dimension by another.

Parameters:
that - The other unit dimension.
Returns:
The quotient of this unit dimension divided by the other.

raiseTo

public UnitDimension raiseTo(int power)
Raises this unit dimension to a power.

Parameters:
power - The power.
Returns:
The result of raising this unit dimension to the power.

getQuantityDimension

public QuantityDimension getQuantityDimension()
Returns the corresponding quantity dimension.

Returns:
The quantity dimension corresponding to this unit dimension.

main

public static void main(String[] args)
                 throws Exception
Tests this class.

Throws:
Exception


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.