org.simpleds.functions
Class EntityToPropertyFunction<T,P>

java.lang.Object
  extended by org.simpleds.functions.AbstractPropertyFunction<T,P>
      extended by org.simpleds.functions.EntityToPropertyFunction<T,P>
Type Parameters:
T - the entity class type
P - the property type
All Implemented Interfaces:
com.google.common.base.Function<T,P>

public class EntityToPropertyFunction<T,P>
extends AbstractPropertyFunction<T,P>

Converts a persistent instance into a property value


Constructor Summary
EntityToPropertyFunction(java.lang.Class<T> clazz, java.lang.String propertyName)
          Iterate over a consistent collection where all items share the same class.
EntityToPropertyFunction(java.lang.String propertyName)
          Iterate over a mixed collection where items can be of different types
 
Method Summary
 
Methods inherited from class org.simpleds.functions.AbstractPropertyFunction
apply, consistent, getProperty
 
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

EntityToPropertyFunction

public EntityToPropertyFunction(java.lang.Class<T> clazz,
                                java.lang.String propertyName)
Iterate over a consistent collection where all items share the same class.

Parameters:
clazz - the entity class type
propertyName - the property name

EntityToPropertyFunction

public EntityToPropertyFunction(java.lang.String propertyName)
Iterate over a mixed collection where items can be of different types

Parameters:
propertyName - the property name