com.sencha.gxt.core.client
Class ToStringValueProvider<T>

java.lang.Object
  extended by com.sencha.gxt.core.client.ToStringValueProvider<T>
Type Parameters:
T - the model type
All Implemented Interfaces:
ValueProvider<T,java.lang.String>

public class ToStringValueProvider<T>
extends java.lang.Object
implements ValueProvider<T,java.lang.String>

A read-only ValueProvider implementation that simply call Object.toString() on the target model. Calls to setValue(Object, String) are ignored.


Constructor Summary
ToStringValueProvider()
          Creates a new value provider with an empty string for the path.
ToStringValueProvider(java.lang.String path)
          Creates a new value provider.
 
Method Summary
 java.lang.String getPath()
          Returns the path that this ValueProvider makes available, from the object, to the value.
 java.lang.String getValue(T object)
          Returns the property value of the given object.
 void setValue(T object, java.lang.String value)
          Sets the value of the given object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToStringValueProvider

public ToStringValueProvider()
Creates a new value provider with an empty string for the path.


ToStringValueProvider

public ToStringValueProvider(java.lang.String path)
Creates a new value provider.

Parameters:
path - the path
Method Detail

getValue

public java.lang.String getValue(T object)
Description copied from interface: ValueProvider
Returns the property value of the given object.

Specified by:
getValue in interface ValueProvider<T,java.lang.String>
Parameters:
object - the target object
Returns:
the property value

setValue

public void setValue(T object,
                     java.lang.String value)
Description copied from interface: ValueProvider
Sets the value of the given object

Specified by:
setValue in interface ValueProvider<T,java.lang.String>

getPath

public java.lang.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 interface ValueProvider<T,java.lang.String>
Returns:
the path from the object to the value


Copyright © 2012. All Rights Reserved.