us.ihmc.utilities.calibration
Class CalibrationProperties

java.lang.Object
  extended by us.ihmc.utilities.calibration.CalibrationProperties

public class CalibrationProperties
extends java.lang.Object

CalibrationProperties Reads and sets Calibration Properties Files. If Neither the Default calibration file or the Current calibration file exists, they will both be created on the first run with any new properties that have been set If only the Default calibration file does not exist it will be created on first run. If only the Current calibration file does not exist it will be created with the values from the Default calibration file. Company: IHMC

Author:
John Carff, Twan Koolen

Constructor Summary
CalibrationProperties()
          create a calibration file in the default locations
CalibrationProperties(java.lang.String directory, java.lang.String currentPropertiesFile)
          create a calibration file in the specified default and current locations
 
Method Summary
 double getDoubleProperty(java.lang.String key)
          return the specified property's value as a Double
 int getIntegerProperty(java.lang.String key)
          return the specified property's value as an Integer
 java.lang.String getStringProperty(java.lang.String key)
          return the specified property's value as a String
 void replaceExpressionsByValuesAndSave()
          Replaces expressions (e.g.
 void save()
          saves the property file to the location specified at creation.
 void setProperty(java.lang.String key, double value)
          Sets the specified property(key) with the specified double value
 void setProperty(java.lang.String key, java.lang.String value)
          Sets the specified property(key) with the specified string value
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalibrationProperties

public CalibrationProperties()
create a calibration file in the default locations


CalibrationProperties

public CalibrationProperties(java.lang.String directory,
                             java.lang.String currentPropertiesFile)
create a calibration file in the specified default and current locations

Method Detail

getStringProperty

public java.lang.String getStringProperty(java.lang.String key)
return the specified property's value as a String


getDoubleProperty

public double getDoubleProperty(java.lang.String key)
return the specified property's value as a Double


getIntegerProperty

public int getIntegerProperty(java.lang.String key)
return the specified property's value as an Integer


setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Sets the specified property(key) with the specified string value


setProperty

public void setProperty(java.lang.String key,
                        double value)
Sets the specified property(key) with the specified double value


save

public void save()
saves the property file to the location specified at creation.


replaceExpressionsByValuesAndSave

public void replaceExpressionsByValuesAndSave()
Replaces expressions (e.g. 324 + 5 - 2) by their values (e.g. 327) and saves to disk