SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

com.solarmetric.conf
Class Value

java.lang.Object
  |
  +--com.solarmetric.conf.Value
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
BooleanValue, DoubleValue, FileValue, IntValue, PluginListValue, PluginValue, StringListValue, StringValue

public abstract class Value
extends Object
implements Cloneable

A configuration value.


Constructor Summary
Value()
          Default constructor.
Value(String prop)
          Constructor.
 
Method Summary
 void addAlias(String key, String value)
          Add an alias to the beginning of the alias list.
 String alias(String str)
          Alias the given setting.
 Object clone()
           
 boolean equals(Object other)
           
 String[] getAliases()
          Aliases for the value in the form key1, value1, key2, value2, ...
 String getDefault()
          The default value for the property.
protected abstract  String getInternalString()
          Return the internal string form of this value.
 ValueListener getListener()
          Listener for value changes.
 String getProperty()
          The property name that will be used when setting or getting this value in a Properties object.
 String getString()
          Return a stringified version of this value.
abstract  Class getValueType()
          Returns the type of the property that this Value represents.
 int hashCode()
           
 boolean isAliasListComprehensive()
          Whether or not the alias list defines all possible settings for this value.
 void setAliases(String[] aliases)
          Aliases for the value in the form key1, value1, key2, value2, ...
 void setAliasListComprehensive(boolean aliasListIsComprehensive)
          Whether or not the alias list defines all possible settings for this value.
 void setDefault(String def)
          The default value for the property.
protected abstract  void setInternalString(String str)
          Set this value from the given string.
 void setListener(ValueListener listen)
          Listener for value changes.
 void setProperty(String prop)
          The property name that will be used when setting or getting this value in a Properties object.
 void setString(String val)
          Set this value from the given string.
 String unalias(String str)
          Unalias the given setting.
 void valueChanged()
          Subclasses should call this method when their inernal value changes.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Value

public Value(String prop)
Constructor. Supply the property name.
See Also:
setProperty(java.lang.String)

Value

public Value()
Default constructor.
Method Detail

getProperty

public String getProperty()
The property name that will be used when setting or getting this value in a Properties object.

setProperty

public void setProperty(String prop)
The property name that will be used when setting or getting this value in a Properties object.

getAliases

public String[] getAliases()
Aliases for the value in the form key1, value1, key2, value2, ...

setAliases

public void setAliases(String[] aliases)
Aliases for the value in the form key1, value1, key2, value2, ...

addAlias

public void addAlias(String key,
                     String value)
Add an alias to the beginning of the alias list.

isAliasListComprehensive

public boolean isAliasListComprehensive()
Whether or not the alias list defines all possible settings for this value. If so, an error will be generated when attempting to invoke any method on this value with an unknown option.

setAliasListComprehensive

public void setAliasListComprehensive(boolean aliasListIsComprehensive)
Whether or not the alias list defines all possible settings for this value. If so, an error will be generated when attempting to invoke any method on this value with an unknown option.

alias

public String alias(String str)
Alias the given setting.

unalias

public String unalias(String str)
Unalias the given setting.

getDefault

public String getDefault()
The default value for the property.

setDefault

public void setDefault(String def)
The default value for the property.

getString

public String getString()
Return a stringified version of this value. If the current value has a short alias key, the alias key is returned.

setString

public void setString(String val)
Set this value from the given string. If the given string is null or empty and a default is defined, the default is used. If the given string (or default) is an alias key, it will be converted to the corresponding value internally.

getValueType

public abstract Class getValueType()
Returns the type of the property that this Value represents.

getInternalString

protected abstract String getInternalString()
Return the internal string form of this value.

setInternalString

protected abstract void setInternalString(String str)
Set this value from the given string.

getListener

public ValueListener getListener()
Listener for value changes.

setListener

public void setListener(ValueListener listen)
Listener for value changes.

valueChanged

public void valueChanged()
Subclasses should call this method when their inernal value changes.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

clone

public Object clone()
Overrides:
clone in class Object

SolarMetric Kodo JDO 3.4.1 generated on May 30 2006

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.