Package com.sencha.gxt.core.client
Class ToStringValueProvider<T>
- java.lang.Object
-
- com.sencha.gxt.core.client.ToStringValueProvider<T>
-
- Type Parameters:
T
- the model type
- All Implemented Interfaces:
ValueProvider<T,String>
public class ToStringValueProvider<T> extends Object implements ValueProvider<T,String>
A read-only ValueProvider implementation that simply callObject.toString()
on the target model. Calls tosetValue(Object, String)
are ignored.
-
-
Constructor Summary
Constructors Constructor Description ToStringValueProvider()
Creates a new value provider with an empty string for the path.ToStringValueProvider(String path)
Creates a new value provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
-
-
-
Constructor Detail
-
ToStringValueProvider
public ToStringValueProvider()
Creates a new value provider with an empty string for the path.
-
ToStringValueProvider
public ToStringValueProvider(String path)
Creates a new value provider.- Parameters:
path
- the path
-
-
Method Detail
-
getValue
public String getValue(T object)
Description copied from interface:ValueProvider
Returns the property value of the given object.- Specified by:
getValue
in interfaceValueProvider<T,String>
- Parameters:
object
- the target object- Returns:
- the property value
-
setValue
public void setValue(T object, String value)
Description copied from interface:ValueProvider
Sets the value of the given object- Specified by:
setValue
in interfaceValueProvider<T,String>
- Parameters:
object
- the target objectvalue
- the property value
-
getPath
public String getPath()
Description copied from interface:ValueProvider
Returns the path that this ValueProvider makes available, from the object, to the value.- Specified by:
getPath
in interfaceValueProvider<T,String>
- Returns:
- the path from the object to the value
-
-