FreeHEP API
Version current

org.freehep.util.parameterdatabase
Class ParameterValue

java.lang.Object
  extended byorg.freehep.util.parameterdatabase.ParameterValue

public class ParameterValue
extends Object

Source Code:
ParameterValue.java

Constructor Summary
protected ParameterValue(Object value)
          This protected constructor creates a new ParameterValue with the given parameters.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to this ParameterValue.
static ParameterValue createParameterValue(Object value)
          This static factory method returns a ParameterValue using the given arguments.
 boolean equals(Object otherValue)
          Equality for two ParameterValues is determined by whether the underlying value objects are equal.
 void finalize()
          We override the finalize method to allow this ParameterValue to be recycled.
 List getPropertyChangeListeners()
          Return an unmodifiable list of the current listeners.
 Object getValue()
          Return the value associated with this ParameterValue.
 int hashCode()
          The hashcode is simply value.hashCode().
protected  void recycle()
          This method will recycle this ParameterValue.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a PropertyChangeListener from this ParameterValue.
 void setValue(Object value)
          Set the value associated with the parameter name.
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterValue

protected ParameterValue(Object value)
This protected constructor creates a new ParameterValue with the given parameters. Users should not create ParameterValues via this constructor, but should instead use the static factory method createParameterValue().

Method Detail

createParameterValue

public static ParameterValue createParameterValue(Object value)
This static factory method returns a ParameterValue using the given arguments. This method will try to use a recycled ParameterValue if one is available.


getValue

public Object getValue()
Return the value associated with this ParameterValue.


setValue

public void setValue(Object value)
Set the value associated with the parameter name.


recycle

protected void recycle()
This method will recycle this ParameterValue. Any further user method calls on this object will result in an IllegalStateException being thrown. This object will be available for reuse only after the JVM determines that there are no more outstanding references to this ParameterValue and the JVM runs the finalize() method.


equals

public boolean equals(Object otherValue)
Equality for two ParameterValues is determined by whether the underlying value objects are equal.


hashCode

public int hashCode()
The hashcode is simply value.hashCode().


finalize

public void finalize()
              throws Throwable
We override the finalize method to allow this ParameterValue to be recycled. It is added to the list of recycled values if the inventory is below the given limit.

Throws:
Throwable

getPropertyChangeListeners

public List getPropertyChangeListeners()
Return an unmodifiable list of the current listeners.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to this ParameterValue.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from this ParameterValue.


FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.