The Encog Project

org.encog.parse.units
Class UnitManager

java.lang.Object
  extended by org.encog.parse.units.UnitManager

public class UnitManager
extends java.lang.Object

Manage the unit types supported by Encog.

Author:
jheaton

Field Summary
static java.lang.String BASE_WEIGHT
          The base weight.
 
Constructor Summary
UnitManager()
           
 
Method Summary
 double convert(java.lang.String from, java.lang.String to, double input)
          Convert the specified unit.
 void createRecognizers(Parse parse)
          Create recongizers for the specified parse object.
 java.lang.String resolveAlias(java.lang.String in)
          Resolve the specified alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_WEIGHT

public static final java.lang.String BASE_WEIGHT
The base weight.

See Also:
Constant Field Values
Constructor Detail

UnitManager

public UnitManager()
Method Detail

convert

public double convert(java.lang.String from,
                      java.lang.String to,
                      double input)
Convert the specified unit.

Parameters:
from - The from unit.
to - The to unit.
input - The value to convert.
Returns:
The converted unit.

createRecognizers

public void createRecognizers(Parse parse)
Create recongizers for the specified parse object.

Parameters:
parse - The parse object to create recognizers for.

resolveAlias

public java.lang.String resolveAlias(java.lang.String in)
Resolve the specified alias.

Parameters:
in - The alias to look up.
Returns:
The alias resolved.

The Encog Project