com.ricebridge.util
Class PropSpec

java.lang.Object
  extended bycom.ricebridge.util.PropSpec
Direct Known Subclasses:
CsvSpec

public class PropSpec
extends Object

Stores named settings.


Constructor Summary
PropSpec()
          Create a new property specification.
 
Method Summary
 PropSpec copyPropSpec()
          Create a copy of this PropSpec instance.
 boolean getBooleanProperty(String pPropName)
          Get the value of a boolean property.
 String getProperty(String pPropName)
          Get the value of a string property.
 void setProperty(String pPropName, boolean pValue)
          Set the value of a boolean property.
 void setProperty(String pPropName, String pValue)
          Set the value of a string property.
 String toString()
          Produce a textual description of the property settings, suitable for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropSpec

public PropSpec()
Create a new property specification.

Method Detail

copyPropSpec

public PropSpec copyPropSpec()
Create a copy of this PropSpec instance.


setProperty

public void setProperty(String pPropName,
                        boolean pValue)
Set the value of a boolean property.

Parameters:
pPropName - boolean property name
pValue - boolean value
See Also:
setProperty(String,String)

setProperty

public void setProperty(String pPropName,
                        String pValue)
Set the value of a string property.

All settings are stored dynamically using a String value for the property name. This enables dynamic access to settings at runtime.

Parameters:
pPropName - string property name
pValue - string value

getProperty

public String getProperty(String pPropName)
Get the value of a string property.

If property has not previously been defined, returns an empty string.

Parameters:
pPropName - of string property

getBooleanProperty

public boolean getBooleanProperty(String pPropName)
Get the value of a boolean property.

If property has not previously been defined, returns false.

Parameters:
pPropName - name of boolean property

toString

public String toString()
Produce a textual description of the property settings, suitable for debugging.



Copyright © 2003-2006 Ricebridge