T
- the model typepublic class ToStringValueProvider<T> extends Object implements ValueProvider<T,String>
ValueProvider
implementation that simply call
Object.toString()
on the target model. Calls to
setValue(Object, String)
are ignored.Constructor and Description |
---|
ToStringValueProvider()
Creates a new value provider with an empty string for the path.
|
ToStringValueProvider(String path)
Creates a new value provider.
|
Modifier and Type | Method and Description |
---|---|
String |
getPath()
Returns the path that this ValueProvider makes available, from the object,
to the value.
|
String |
getValue(T object)
Returns the property value of the given object.
|
void |
setValue(T object,
String value)
Sets the value of the given object
|
public ToStringValueProvider()
public ToStringValueProvider(String path)
path
- the pathpublic String getValue(T object)
ValueProvider
getValue
in interface ValueProvider<T,String>
object
- the target objectpublic void setValue(T object, String value)
ValueProvider
setValue
in interface ValueProvider<T,String>
public String getPath()
ValueProvider
getPath
in interface ValueProvider<T,String>
Copyright © 2018. All rights reserved.