protoj.core
Class PropertyInfo

java.lang.Object
  extended by protoj.core.PropertyInfo

public final class PropertyInfo
extends java.lang.Object

Represents a property in the PropertyStore. Where there is no fully defined property available in the PropertyStore each PropertyInfo instance contains defaults to be used instead.

Author:
Ashley Williams

Constructor Summary
PropertyInfo(PropertyStore store, java.lang.String key, java.lang.String missingDefault, java.lang.String emptyDefault, java.lang.String description)
          See the corresponding property descriptions.
 
Method Summary
 java.lang.String createJvmArg(java.lang.String value)
          Creates a command line equivalent of this property with the specified value.
 boolean getBooleanValue()
          Conveniently typed method for converting getValue().
 java.lang.String getDescription()
          A description useful for help text.
 java.lang.String getEmptyDefault()
          The default value to use when the value of a property is empty.
 int getIntegerValue()
          Conveniently typed method for converting getValue().
 java.lang.String getKey()
          The property key.
 java.lang.String getMissingDefault()
          The default value to use when a property isn't specified at all.
 java.lang.String getValue()
          Provides a value for the underlying key in all cases: Where a value is present, that value is used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyInfo

public PropertyInfo(PropertyStore store,
                    java.lang.String key,
                    java.lang.String missingDefault,
                    java.lang.String emptyDefault,
                    java.lang.String description)
See the corresponding property descriptions.

Parameters:
store -
key -
missingDefault -
emptyDefault -
description -
Method Detail

getKey

public java.lang.String getKey()
The property key.

Returns:

getValue

public java.lang.String getValue()
Provides a value for the underlying key in all cases:

Returns:

getBooleanValue

public boolean getBooleanValue()
Conveniently typed method for converting getValue().

Returns:

getIntegerValue

public int getIntegerValue()
Conveniently typed method for converting getValue().

Returns:

getEmptyDefault

public java.lang.String getEmptyDefault()
The default value to use when the value of a property is empty. For example: -Dmyproperty or -Dmyproperty=

Returns:

getMissingDefault

public java.lang.String getMissingDefault()
The default value to use when a property isn't specified at all.

Returns:

getDescription

public java.lang.String getDescription()
A description useful for help text.

Returns:

createJvmArg

public java.lang.String createJvmArg(java.lang.String value)
Creates a command line equivalent of this property with the specified value. Convenient for writing test cases.

Parameters:
value - can be null for a property with no value
Returns: