chemaxon.alchemist.utils
Class AlchemistState

java.lang.Object
  extended by chemaxon.alchemist.utils.AlchemistState

public class AlchemistState
extends java.lang.Object


Constructor Summary
AlchemistState()
           
 
Method Summary
 java.lang.Object getProperty(java.lang.String key)
          Returns the property for the given key
 void loadProperties(java.io.File file)
          This method loads the properties from the given file
 void loadProperties(java.lang.String path)
          This method loads the properties from the given file path
 void removeProperty(java.lang.String key)
          This method removes a property
 void saveProperties(java.io.File file)
          This method saves the properties to the given file
 void saveProperties(java.lang.String path)
          This method saves the properties to the given file path
 void setPersistentProperty(java.lang.String key, java.lang.Object value)
          This method sets a key-value pair as a persistent property, which can be loaded and saved via loadProperties and saveProperties methods
 void setProperty(java.lang.String key, java.lang.Object value)
          This method sets a key-value pair as a property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlchemistState

public AlchemistState()
Method Detail

loadProperties

public void loadProperties(java.lang.String path)
                    throws java.io.FileNotFoundException
This method loads the properties from the given file path

Parameters:
path - is the path to property file
Throws:
java.io.FileNotFoundException

loadProperties

public void loadProperties(java.io.File file)
                    throws java.io.FileNotFoundException
This method loads the properties from the given file

Parameters:
file - is the property file
Throws:
java.io.FileNotFoundException

saveProperties

public void saveProperties(java.lang.String path)
                    throws java.io.FileNotFoundException
This method saves the properties to the given file path

Parameters:
path - is the path to property file
Throws:
java.io.FileNotFoundException

saveProperties

public void saveProperties(java.io.File file)
                    throws java.io.FileNotFoundException
This method saves the properties to the given file

Parameters:
file - is the property file
Throws:
java.io.FileNotFoundException

getProperty

public java.lang.Object getProperty(java.lang.String key)
Returns the property for the given key

Parameters:
key - is the key of the property
Returns:
the value, or null if key not exists

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
This method sets a key-value pair as a property

Parameters:
key - is the key
value - is the value

setPersistentProperty

public void setPersistentProperty(java.lang.String key,
                                  java.lang.Object value)
This method sets a key-value pair as a persistent property, which can be loaded and saved via loadProperties and saveProperties methods

Parameters:
key - is the key
value - is the value

removeProperty

public void removeProperty(java.lang.String key)
This method removes a property

Parameters:
key - is the key of the property to be removed