VALUE
- is the generic type of the value
.public interface AttributeReadValueAdvanced<VALUE> extends AttributeReadValue<VALUE>
value
of an object.Modifier and Type | Method and Description |
---|---|
VALUE |
getOriginalValue()
This method gets the last value that has been
set . |
VALUE |
getValue()
This method gets the value of this object.
|
VALUE |
getValueOrException(VALUE template)
This method is like
getValue() but does NOT catch exceptions while parsing the value from the
user input. |
VALUE getValue()
null
instead. If you want to do validation and give feedback to the
user please use getValueOrException(Object)
instead. However, there are higher-level ways to do
this such as
getValueAndValidate
.getValue
in interface AttributeReadValue<VALUE>
null
unless otherwise stated.VALUE getValueOrException(VALUE template) throws RuntimeException
getValue()
but does NOT catch exceptions while parsing the value from the
user input. Additionally it allows to provide a template object that gets populated. This allows advanced
features with polymorphism as you can also provide a sub-class of <VALUE>.template
- is the object where the data is filled in. May also be null
- then this
method will create a new instance.null
if empty. If the value type is
String
the empty String
has to be returned if no value has been entered. In case
<VALUE> is a mutable object (java bean) and template
is NOT null
,
this method is supposed to return template
.RuntimeException
- if the entered value is invalid (e.g. paring caused a
NumberFormatException
).VALUE getOriginalValue()
set
.
After calling AttributeWriteValueAdvanced.setValue(Object)
the value can be modified (by the user
in case of a widget). Then calls to getValue()
will return the current value with its potential
modifications (as a new object). This method will ensure to get the value that was
set
before by the program. AttributeWriteValueAdvanced.resetValue()
rely on this fact. Therefore getValue()
will
always return a new instance.Copyright © 2001–2016 mmm-Team. All rights reserved.