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

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

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

A read-only ValueProvider that simply returns the model as the property value. Useful when wanting to work directly with the model, rather than a property.


Constructor Summary
IdentityValueProvider()
          Creates a new value provider with an empty string for the path.
IdentityValueProvider(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.
 T getValue(T object)
          Returns the property value of the given object.
 void setValue(T object, T 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

IdentityValueProvider

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


IdentityValueProvider

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

Parameters:
path - the path
Method Detail

setValue

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

Specified by:
setValue in interface ValueProvider<T,T>

getValue

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

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

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,T>
Returns:
the path from the object to the value


Copyright © 2012. All Rights Reserved.