Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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)`
`Object` | `clone()`
`boolean` | `equals(Object other)`
`String[]` | `getAliases()` Aliases for the value in the form key1, value1, key2, value2, ...
`PropertyChangeSupport` | `getChangeSupport()` The property change support (if any) for this value.
`String` | `getDefault()` The default value for the property.
`protected abstract String` | `getInternalString()` Return the internal string form of this value.
`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()`
`void` | `setAliases(String[] aliases)` Aliases for the value in the form key1, value1, key2, value2, ...
`void` | `setChangeSupport(PropertyChangeSupport changeSupport)` Add the ability for this value to listen for property changes.
`void` | `setDefault(String def)` The default value for the property.
`protected abstract void` | `setInternalString(String str)` Set this value from the given string.
`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)`

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.

### alias

    public String alias(String str)

### unalias

    public String unalias(String str)

### 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.

### 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`

### setChangeSupport

    public void setChangeSupport(PropertyChangeSupport changeSupport)

  Add the ability for this value to listen for property changes.

### getChangeSupport

    public PropertyChangeSupport getChangeSupport()

  The property change support (if any) for this value.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.2.4 generated on January 7 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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