- java.lang.Object
-
- io.github.mmm.event.AbstractEventSource<ObservableEvent<V>,ObservableEventListener<? super V>>
-
- io.github.mmm.value.observable.AbstractObservableValue<V>
-
- io.github.mmm.value.observable.AbstractWritableObservableValue<V>
-
- io.github.mmm.property.Property<V>
-
- io.github.mmm.property.object.SimpleProperty<V>
-
- io.github.mmm.property.object.ObjectProperty<V>
-
- Type Parameters:
V
- type of thevalue
.
- All Implemented Interfaces:
EventSource<ObservableEvent<V>,ObservableEventListener<? super V>>
,MarshallableObject
,Marshaller<Object>
,Marshalling<Object>
,MarshallingObject
,UnmarshallableObject
,Unmarshaller<Object>
,ReadableObjectProperty<V>
,ReadableSimpleProperty<V>
,WritableObjectProperty<V>
,WritableSimpleProperty<V>
,ReadableProperty<V>
,WritableProperty<V>
,Validatable
,Expression<V>
,ObservableObjectValue<V>
,ObservableSimpleValue<V>
,ReadableObjectValue<V>
,ReadableSimpleValue<V>
,WritableObjectValue<V>
,WritableSimpleValue<V>
,ObservableValue<V>
,WritableObservableValue<V>
,PropertyPath<V>
,ReadableTypedValue<V>
,ReadableValue<V>
,TypedPropertyPath<V>
,WritableValue<V>
,Cloneable
,Supplier<V>
- Direct Known Subclasses:
IdProperty
,LinkProperty
public class ObjectProperty<V> extends SimpleProperty<V> implements WritableObjectProperty<V>
Generic implementation ofWritableProperty
for arbitrary objects that do not have their own custom implementation.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from interface io.github.mmm.property.WritableProperty
NO_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description ObjectProperty(String name, Class<V> valueClass)
The constructor.ObjectProperty(String name, Class<V> valueClass, PropertyMetadata<V> metadata)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected V
doGet()
protected void
doSet(V newValue)
Class<V>
getValueClass()
V
parse(String valueAsString)
-
Methods inherited from class io.github.mmm.property.object.SimpleProperty
read, write
-
Methods inherited from class io.github.mmm.property.Property
clearValidationResult, clone, copy, doValidate, doValidate, equals, get, getMetadata, getName, getReadOnly, hashCode, isReadOnly, isValid, isValueMutable, readObject, requireWritable, setWithChange, toString, validate, writeObject
-
Methods inherited from class io.github.mmm.value.observable.AbstractWritableObservableValue
bindInternal, bindOneWay, bindTwoWay, isBoundOneWay, isValueEqual, set, unbindOneWay, unbindTwoWay
-
Methods inherited from class io.github.mmm.value.observable.AbstractObservableValue
addListener, fireChange, fireEvent, fireEvent, fireEventFor, fireEventFor, fireEventWithOldValue, hasChangeAwareListeners, invalidate, removeListener, toString
-
Methods inherited from class io.github.mmm.event.AbstractEventSource
getEventAdapter, hasListeners
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
Methods inherited from interface io.github.mmm.value.observable.Expression
asString, dispose, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull
-
Methods inherited from interface io.github.mmm.marshall.MarshallableObject
write, writeObject
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableObjectValue
getSafe, getValue
-
Methods inherited from interface io.github.mmm.property.ReadableProperty
getMetadata, getName, isReadOnly, isTransient, isValid
-
Methods inherited from interface io.github.mmm.property.object.ReadableSimpleProperty
getValueType
-
Methods inherited from interface io.github.mmm.value.observable.object.ReadableSimpleValue
getAsString
-
Methods inherited from interface io.github.mmm.value.ReadableValue
get
-
Methods inherited from interface io.github.mmm.marshall.UnmarshallableObject
read, readObject
-
Methods inherited from interface io.github.mmm.validation.Validatable
validate
-
Methods inherited from interface io.github.mmm.value.observable.object.WritableObjectValue
setValue
-
Methods inherited from interface io.github.mmm.value.observable.WritableObservableValue
bindOneWay, bindTwoWay, isBoundOneWay, unbindOneWay, unbindTwoWay
-
Methods inherited from interface io.github.mmm.property.WritableProperty
copy, getReadOnly
-
Methods inherited from interface io.github.mmm.value.observable.object.WritableSimpleValue
setAsString
-
Methods inherited from interface io.github.mmm.value.WritableValue
set
-
-
-
-
Constructor Detail
-
ObjectProperty
public ObjectProperty(String name, Class<V> valueClass)
The constructor.- Parameters:
name
- thename
.valueClass
- thevalue class
.
-
ObjectProperty
public ObjectProperty(String name, Class<V> valueClass, PropertyMetadata<V> metadata)
The constructor.- Parameters:
name
- thename
.valueClass
- thevalue class
.metadata
- themetadata
.
-
-
Method Detail
-
getValueClass
public Class<V> getValueClass()
- Specified by:
getValueClass
in interfaceReadableTypedValue<V>
- Returns:
- the
Class
reflecting the type ofvalues
that can be stored by this property. Even if thevalue
isnull
the property must support returning the property class.
-
doGet
protected V doGet()
- Specified by:
doGet
in classAbstractWritableObservableValue<V>
- Returns:
- the internal
value
.
-
doSet
protected void doSet(V newValue)
- Specified by:
doSet
in classAbstractWritableObservableValue<V>
- Parameters:
newValue
- the newvalue
to set.- See Also:
AbstractWritableObservableValue.set(Object)
-
-