Package groovy.model
Class ValueHolder
- java.lang.Object
-
- groovy.model.ValueHolder
-
- All Implemented Interfaces:
ValueModel
public class ValueHolder extends Object implements ValueModel
A simple ValueModel implementation which is a holder of an object value. Used to share local variables with closures
-
-
Constructor Summary
Constructors Constructor Description ValueHolder()
ValueHolder(Class type)
ValueHolder(Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.Class
getType()
Object
getValue()
boolean
isEditable()
void
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.void
setEditable(boolean editable)
void
setValue(Object value)
-
-
-
Method Detail
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.- Parameters:
listener
- The listener to add.
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.- Parameters:
listener
- The listener to remove.
-
getValue
public Object getValue()
- Specified by:
getValue
in interfaceValueModel
-
setValue
public void setValue(Object value)
- Specified by:
setValue
in interfaceValueModel
-
getType
public Class getType()
- Specified by:
getType
in interfaceValueModel
-
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interfaceValueModel
-
setEditable
public void setEditable(boolean editable)
-
-