Package com.vaadin.data
Class ValueContext
- java.lang.Object
-
- com.vaadin.data.ValueContext
-
- All Implemented Interfaces:
Serializable
public class ValueContext extends Object implements Serializable
Value context forConverter
s. Contains relevant information for converting values.- Since:
- 8.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ValueContext()
Constructor forValueContext
without aLocale
.ValueContext(Component component)
Constructor forValueContext
.ValueContext(Component component, HasValue<?> hasValue)
Constructor forValueContext
.ValueContext(Component component, HasValue<?> hasValue, Locale locale)
Constructor forValueContext
.ValueContext(Locale locale)
Constructor forValueContext
without aComponent
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Component>
getComponent()
Returns anOptional
for theComponent
related to value conversion.Optional<HasValue<?>>
getHasValue()
Returns anOptional
for theHasValue
used in the value conversion.Optional<Locale>
getLocale()
Returns anOptional
for theLocale
used in the value conversion.
-
-
-
Constructor Detail
-
ValueContext
public ValueContext()
Constructor forValueContext
without aLocale
.
-
ValueContext
public ValueContext(Locale locale)
Constructor forValueContext
without aComponent
.- Parameters:
locale
- The locale used with conversion. Can be null.
-
ValueContext
public ValueContext(Component component)
Constructor forValueContext
.- 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 forValueContext
.- Parameters:
component
- The component related to current value. Can be null.hasValue
- The value source related to current value. Can be null.- Since:
- 8.1
-
ValueContext
public ValueContext(Component component, HasValue<?> hasValue, Locale locale)
Constructor forValueContext
.- Parameters:
component
- The component can benull
.locale
- The locale used with conversion. Can benull
.hasValue
- The value source related to current value. Can benull
.- Since:
- 8.1
-
-
Method Detail
-
getComponent
public Optional<Component> getComponent()
Returns anOptional
for theComponent
related to value conversion.- Returns:
- the optional of component
-
getLocale
public Optional<Locale> getLocale()
Returns anOptional
for theLocale
used in the value conversion.- Returns:
- the optional of locale
-
-