com.solarmetric.kodo.conf
Class StringValue
java.lang.Object
|
+--com.solarmetric.kodo.conf.Value
|
+--com.solarmetric.kodo.conf.StringValue
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ClassValue
- public class StringValue
- extends Value
- See Also:
- Serialized Form
GET_EMPTY_NULL
public static final short GET_EMPTY_NULL
GET_EMPTY_EMPTY
public static final short GET_EMPTY_EMPTY
SET_EMPTY_ALLOW
public static final short SET_EMPTY_ALLOW
SET_EMPTY_IGNORE
public static final short SET_EMPTY_IGNORE
value
String value
validValues
String[] validValues
getEmpty
short getEmpty
setEmpty
short setEmpty
StringValue
public StringValue(String prop,
String value,
String[] validValues,
Class configClass,
boolean expert,
String type)
StringValue
public StringValue(String prop,
String value,
Class configClass,
boolean expert,
String type)
set
public void set(String value)
get
public String get()
getString
public String getString()
- Overrides:
getString in class Value
setFromProperties
public void setFromProperties(TypedProperties props)
- Overrides:
setFromProperties in class Value
getDescriptor
public PropertyDescriptor getDescriptor()
- Description copied from class:
Value
- Returns a JavaBean
PropertyDescriptor, which holds metadata
about the configuration option.
- Overrides:
getDescriptor in class Value
setString
public void setString(String stringValue)
- Overrides:
setString in class Value
setSetEmpty
public void setSetEmpty(short type)
- set the set policy for empty strings
SET_EMPTY_IGNORE - ignore set attempts with empty argument. For
required properties
SET_EMPTY_ALLOW - allow setting of empty value (default)
getSetEmpty
public short getSetEmpty()
- return the set empty string policy
setGetEmpty
public void setGetEmpty(short type)
- set the get policy for empty strings to the given type.
GET_EMPTY_NULL = return null if the value is empty
GET_EMPTY_EMPTY = return original empty string if empty (default)
getGetEmpty
public short getGetEmpty()
- return the get policy
Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.