Package org.dellroad.stuff.vaadin7
Class SimpleProperty<T,V>
- java.lang.Object
-
- org.dellroad.stuff.vaadin7.ReadOnlyProperty<V>
-
- org.dellroad.stuff.vaadin7.SimpleProperty<T,V>
-
- Type Parameters:
T- the type of the underlying Java objectV- the type of the property
- All Implemented Interfaces:
Property<V>,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeNotifier,Serializable,BackedProperty<T,V>
public class SimpleProperty<T,V> extends ReadOnlyProperty<V> implements BackedProperty<T,V>
Simple read-onlyPropertyimplementation backed by a Java object.The
Propertyis defined using aPropertyDefalong with aPropertyExtractorthat is capable of reading the property's value from the underlying Java object.- See Also:
SimpleContainer,SimpleItem, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T extends Object>, Property.ValueChangeEvent, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
-
Constructor Summary
Constructors Constructor Description SimpleProperty(T object, PropertyDef<V> propertyDef, PropertyExtractor<? super T> propertyExtractor)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetObject()Retrieve the underlying Java object.Class<V>getType()VgetValue()-
Methods inherited from class org.dellroad.stuff.vaadin7.ReadOnlyProperty
addListener, addListener, addReadOnlyStatusChangeListener, addValueChangeListener, fireValueChange, firstListenerAdded, isReadOnly, lastListenerRemoved, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValueChangeListener, setReadOnly, setValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.data.Property
isReadOnly, setReadOnly, setValue
-
-
-
-
Constructor Detail
-
SimpleProperty
public SimpleProperty(T object, PropertyDef<V> propertyDef, PropertyExtractor<? super T> propertyExtractor)
Constructor.- Parameters:
object- underlying Java objectpropertyDef- property definitionpropertyExtractor- extracts the property value fromobject- Throws:
IllegalArgumentException- if any parameter is null
-
-
Method Detail
-
getObject
public T getObject()
Description copied from interface:BackedPropertyRetrieve the underlying Java object.- Specified by:
getObjectin interfaceBackedProperty<T,V>- Returns:
- underlying Java object, never null
-
-