com.sodius.mdw.core.util
Interface PropertySet

All Known Subinterfaces:
ConnectorContext, ConnectorDescriptor
All Known Implementing Classes:
AbstractPropertySet, DefaultPropertySet

public interface PropertySet

Represents a set of properties.

Clients may implement this interface.

Since:
3.1.0

Method Summary
 Object getProperty(String name)
          Returns the value mapped to the specified property name.
 boolean getProperty(String name, boolean defaultValue)
          Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a boolean.
 float getProperty(String name, float defaultValue)
          Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a float.
 int getProperty(String name, int defaultValue)
          Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a int.
 String getProperty(String name, String defaultValue)
          Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a String.
 Set<String> getPropertyNames()
          Returns the actual property names defined in this set.
 void setProperty(String name, boolean value)
          Associates the specified value with a property name.
 void setProperty(String name, float value)
          Associates the specified value with a property name.
 void setProperty(String name, int value)
          Associates the specified value with a property name.
 void setProperty(String name, Object value)
          Associates the specified value with a property name.
 void setProperty(String name, String value)
          Associates the specified value with a property name.
 

Method Detail

getPropertyNames

Set<String> getPropertyNames()
Returns the actual property names defined in this set.

Returns:
an unmodifiable set of registered property names.

getProperty

Object getProperty(String name)
Returns the value mapped to the specified property name. Returns null if the property is not defined or if it maps to null.

Parameters:
name - the property name
Returns:
the property value

getProperty

String getProperty(String name,
                   String defaultValue)
Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a String.

Parameters:
name - the property name
defaultValue - the default value to use if the property is not found
Returns:
the property value

getProperty

int getProperty(String name,
                int defaultValue)
Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a int.

Parameters:
name - the property name
defaultValue - the default value to use if the property is not found
Returns:
the property value

getProperty

boolean getProperty(String name,
                    boolean defaultValue)
Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a boolean.

Parameters:
name - the property name
defaultValue - the default value to use if the property is not found
Returns:
the property value

getProperty

float getProperty(String name,
                  float defaultValue)
Returns the value mapped to the specified property name, or the specified default value if the property is not found or if it cannot be treated as a float.

Parameters:
name - the property name
defaultValue - the default value to use if the property is not found
Returns:
the property value

setProperty

void setProperty(String name,
                 Object value)
Associates the specified value with a property name.

Parameters:
name - the property name.
value - the property value (can be null)

setProperty

void setProperty(String name,
                 String value)
Associates the specified value with a property name.

Parameters:
name - the property name.
value - the property value (can be null)

setProperty

void setProperty(String name,
                 int value)
Associates the specified value with a property name.

Parameters:
name - the property name.
value - the property value

setProperty

void setProperty(String name,
                 boolean value)
Associates the specified value with a property name.

Parameters:
name - the property name.
value - the property value

setProperty

void setProperty(String name,
                 float value)
Associates the specified value with a property name.

Parameters:
name - the property name.
value - the property value