net.sf.doolin.util
Class PropertyFunction<S,T>

java.lang.Object
  extended by net.sf.doolin.util.PropertyFunction<S,T>
Type Parameters:
S - Type for the source
T - Expected type for the target
All Implemented Interfaces:
com.google.common.base.Function<S,T>

public class PropertyFunction<S,T>
extends Object
implements com.google.common.base.Function<S,T>

This class performs a conversion by extracting a property from the source?

Author:
Damien Coraboeuf
See Also:
Utils.getProperty(Object, String)

Constructor Summary
PropertyFunction(String propertyName)
          Constructor.
 
Method Summary
 T apply(S source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

PropertyFunction

public PropertyFunction(String propertyName)
Constructor.

Parameters:
propertyName - Name of the property to take from the source.
Method Detail

apply

public T apply(S source)
Specified by:
apply in interface com.google.common.base.Function<S,T>


Copyright © 2011. All Rights Reserved.