com.solarmetric.kodo.conf
Class Value
java.lang.Object
|
+--com.solarmetric.kodo.conf.Value
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- BooleanValue, IntegerValue, StringValue
- public abstract class Value
- extends Object
- implements Serializable
A Value is holder for a configuration value and metadata about
a PropertyDescriptor for the configuration option. Metadata
about the Property will be constructed from the Localizer
for the package of the configuration class. The following localized
strings will be used for describing the component:
- Name.DisplayName: the name that will be displayed for the
option in a user interface.
- Name.ShortDescription: a brief description of the option.
- See Also:
- Serialized Form
ATTRIBUTE_ALLOWED_VALUES
public static final String ATTRIBUTE_ALLOWED_VALUES
ATTRIBUTE_TYPE
public static final String ATTRIBUTE_TYPE
Value
public Value(String prop,
Class configClass,
boolean expert,
String type)
- Constructor.
- Parameters:
prop - the name of the property associated with the valueconfigClass - the Configuration class associated with the valueexpert - if true, then this is an "expert" value.type - the unlocalized name of the type.
getProperty
public String getProperty()
- Returns the property name that will be used when setting or
getting this value in a
Properties object.
getDescriptor
public PropertyDescriptor getDescriptor()
- Returns a JavaBean
PropertyDescriptor, which holds metadata
about the configuration option.
setIntoProperties
public void setIntoProperties(Properties props)
- Set the value of this
Value into a Properties
object.
- See Also:
getProperty()
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
getString
public abstract String getString()
setString
public abstract void setString(String stringValue)
setFromProperties
public abstract void setFromProperties(TypedProperties props)
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.