com.vaadin.flow.data.binder.
Class ValueContext
- java.lang.Object
-
- com.vaadin.flow.data.binder.ValueContext
-
All Implemented Interfaces:
public class ValueContext extends Object implements Serializable
Value context for
Converter
s. Contains relevant information for converting values.Since:
1.0.
Author:
Vaadin Ltd
See Also:
-
-
Constructor Summary
Constructors Constructor Description ValueContext()
Constructor for
ValueContext
without aLocale
.ValueContext(Component component)
Constructor for
ValueContext
.ValueContext(Component component, HasValue<?,?> hasValue)
Constructor for
ValueContext
.ValueContext(Component component, HasValue<?,?> hasValue, Locale locale)
Constructor for
ValueContext
.ValueContext(Locale locale)
Constructor for
ValueContext
without aComponent
.
-
Method Summary
All Methods Modifier and Type Method Description Optional<Component>
getComponent()
Returns an
Optional
for theComponent
related to value conversion.Optional<HasValue<?,?>>
getHasValue()
Returns an
Optional
for theHasValue
used in the value conversion.Optional<Locale>
getLocale()
Returns an
Optional
for theLocale
used in the value conversion.
-
-
-
Constructor Detail
-
ValueContext
public ValueContext()
Constructor for
ValueContext
without aLocale
.
-
ValueContext
public ValueContext(Locale locale)
Constructor for
ValueContext
without aComponent
.Parameters:
locale
- The locale used with conversion. Can be null.
-
ValueContext
public ValueContext(Component component)
Constructor for
ValueContext
.Parameters:
component
- The component related to current value. Can be null. If the component implementsHasValue
, it will be returned bygetHasValue()
as well.
-
ValueContext
public ValueContext(Component component, HasValue<?,?> hasValue)
Constructor for
ValueContext
.Parameters:
component
- The component related to current value. Can be null.hasValue
- The value source related to current value. Can be null.
-
-
Method Detail
-
getComponent
public Optional<Component> getComponent()
Returns an
Optional
for theComponent
related to value conversion.Returns:
the optional of component
-
getLocale
public Optional<Locale> getLocale()
Returns an
Optional
for theLocale
used in the value conversion.Returns:
the optional of locale
-
-