- 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<Range<V>>
-
- io.github.mmm.property.range.RangeProperty<V>
-
- Type Parameters:
V
- type of theRange
bounds.
- All Implemented Interfaces:
EventSource<ObservableEvent<Range<V>>,ObservableEventListener<? super Range<V>>>
,MarshallableObject
,Marshaller<Object>
,Marshalling<Object>
,MarshallingObject
,UnmarshallableObject
,Unmarshaller<Object>
,ReadableSimpleProperty<Range<V>>
,WritableSimpleProperty<Range<V>>
,ReadableRangeProperty<V>
,WritableRangeProperty<V>
,ReadableProperty<Range<V>>
,WritableProperty<Range<V>>
,Validatable
,Expression<Range<V>>
,ObservableSimpleValue<Range<V>>
,ReadableSimpleValue<Range<V>>
,WritableSimpleValue<Range<V>>
,ObservableValue<Range<V>>
,WritableObservableValue<Range<V>>
,PropertyPath<Range<V>>
,ReadableTypedValue<Range<V>>
,ReadableValue<Range<V>>
,TypedPropertyPath<Range<V>>
,WritableValue<Range<V>>
,Cloneable
,Supplier<Range<V>>
public class RangeProperty<V> extends SimpleProperty<Range<V>> implements WritableRangeProperty<V>
Implementation ofWritableRangeProperty
.- Since:
- 1.0.0
-
-
Field Summary
-
Fields inherited from interface io.github.mmm.property.WritableProperty
NO_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description RangeProperty(String name, SimpleProperty<V> valueProperty)
The constructor.RangeProperty(String name, SimpleProperty<V> valueProperty, PropertyMetadata<Range<V>> metadata)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Range<V>
doGet()
protected void
doSet(Range<V> newValue)
Property<V>
getValueProperty()
Range<V>
parse(String valueAsString)
void
read(StructuredReader reader)
void
write(StructuredWriter writer)
-
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
writeObject
-
Methods inherited from interface io.github.mmm.value.observable.ObservableValue
toString
-
Methods inherited from interface io.github.mmm.property.ReadableProperty
getMetadata, getName, isReadOnly, isTransient, isValid
-
Methods inherited from interface io.github.mmm.property.range.ReadableRangeProperty
getSafe, getValueClass
-
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
readObject
-
Methods inherited from interface io.github.mmm.validation.Validatable
validate
-
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
-
RangeProperty
public RangeProperty(String name, SimpleProperty<V> valueProperty)
The constructor.- Parameters:
name
- thename
.valueProperty
- thevalue property
.
-
RangeProperty
public RangeProperty(String name, SimpleProperty<V> valueProperty, PropertyMetadata<Range<V>> metadata)
The constructor.- Parameters:
name
- thename
.metadata
- themetadata
.valueProperty
- thevalue property
.
-
-
Method Detail
-
doGet
protected Range<V> doGet()
- Specified by:
doGet
in classAbstractWritableObservableValue<Range<V>>
- Returns:
- the internal
value
.
-
doSet
protected void doSet(Range<V> newValue)
- Specified by:
doSet
in classAbstractWritableObservableValue<Range<V>>
- Parameters:
newValue
- the newvalue
to set.- See Also:
AbstractWritableObservableValue.set(Object)
-
parse
public Range<V> parse(String valueAsString)
- Specified by:
parse
in interfaceWritableSimpleValue<V>
- Parameters:
valueAsString
- the value asString
. May benull
.- Returns:
- the parsed
value
. May benull
(e.g. if the givenString
isnull
).
-
read
public void read(StructuredReader reader)
- Specified by:
read
in interfaceUnmarshallableObject
- Overrides:
read
in classSimpleProperty<Range<V>>
- Parameters:
reader
- theStructuredReader
where to read the data from. This object will be modified such that the read data will be applied. For complex objects (e.g. beans with multiple properties) those properties not defined in the data that is read will not be overwritten. In order to get a clean representation of the data from the given reader you should invoke this method on an empty object.
-
write
public void write(StructuredWriter writer)
- Specified by:
write
in interfaceMarshallableObject
- Overrides:
write
in classSimpleProperty<Range<V>>
- Parameters:
writer
- theStructuredWriter
where to marshall (serialize) the data of this object to.- See Also:
MarshallableObject.writeObject(StructuredWriter, Object)
-
-