org.pz.platypus.utilities
Class Conversions

java.lang.Object
  extended by org.pz.platypus.utilities.Conversions

public class Conversions
extends java.lang.Object

Performs various conversions of units of measure.

Author:
alb

Constructor Summary
Conversions()
           
 
Method Summary
static float convertParameterToPoints(CommandParameter cp, DocData docData)
          Utility function to convert units in command parameters to points
static java.lang.String convertParameterUnitToString(CommandParameter cp, GDD gdd)
          Converts a parameter unit type to a descriptive string (for error messages)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversions

public Conversions()
Method Detail

convertParameterToPoints

public static float convertParameterToPoints(CommandParameter cp,
                                             DocData docData)
Utility function to convert units in command parameters to points

Parameters:
cp - the command parameter
docData - which is used in a few calculations
Returns:
the value in points

convertParameterUnitToString

public static java.lang.String convertParameterUnitToString(CommandParameter cp,
                                                            GDD gdd)
Converts a parameter unit type to a descriptive string (for error messages)

Parameters:
cp - the parameter containing the unit type
gdd - the GDD, containing the table of literals
Returns:
the name of the unit, or " " if it's not valid, or the empty string for all other errors


Copyright © 2008-10 Pacific Data Works LLC