org.qi4j.library.conversion.values
Class EntityToValue.EntityToValueMixin
java.lang.Object
org.qi4j.library.conversion.values.EntityToValue.EntityToValueMixin
- All Implemented Interfaces:
- EntityToValue
- Enclosing interface:
- EntityToValue
public static class EntityToValue.EntityToValueMixin
- extends java.lang.Object
- implements EntityToValue
Method Summary |
<T> java.lang.Iterable<T> |
|
convert(java.lang.Class<T> valueType,
java.lang.Iterable<java.lang.Object> entities)
Convert an iterable of entities to an iterable of values. |
<T> java.lang.Iterable<T> |
|
convert(java.lang.Class<T> valueType,
java.lang.Iterable<java.lang.Object> entities,
Function<T,T> prototypeOpportunity)
Convert an iterable of entities to an iterable of values with an opportunity to customize their prototypes. |
|
convert(java.lang.Class<T> valueType,
java.lang.Object entity)
Convert an entity to a value. |
|
convert(java.lang.Class<T> valueType,
java.lang.Object entity,
Function<T,T> prototypeOpportunity)
Convert an entity to a value with an opportunity to customize its prototype. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntityToValue.EntityToValueMixin
public EntityToValue.EntityToValueMixin()
convert
public <T> T convert(java.lang.Class<T> valueType,
java.lang.Object entity)
- Description copied from interface:
EntityToValue
- Convert an entity to a value.
- Specified by:
convert
in interface EntityToValue
- Type Parameters:
T
- parametrized type of the value- Parameters:
valueType
- type of the valueentity
- the entity to convert to a value
- Returns:
- the resulting value
convert
public <T> T convert(java.lang.Class<T> valueType,
java.lang.Object entity,
Function<T,T> prototypeOpportunity)
- Description copied from interface:
EntityToValue
- Convert an entity to a value with an opportunity to customize its prototype.
- Specified by:
convert
in interface EntityToValue
- Type Parameters:
T
- parametrized type of the value- Parameters:
valueType
- type of the valueentity
- the entity to convert to a valueprototypeOpportunity
- a Function that will be mapped on the value prototype before instanciantion
- Returns:
- the resulting value
convert
public <T> java.lang.Iterable<T> convert(java.lang.Class<T> valueType,
java.lang.Iterable<java.lang.Object> entities)
- Description copied from interface:
EntityToValue
- Convert an iterable of entities to an iterable of values.
- Specified by:
convert
in interface EntityToValue
- Type Parameters:
T
- parametrized type of the value- Parameters:
valueType
- type of the valueentities
- the entities to convert to values
- Returns:
- the resulting values
convert
public <T> java.lang.Iterable<T> convert(java.lang.Class<T> valueType,
java.lang.Iterable<java.lang.Object> entities,
Function<T,T> prototypeOpportunity)
- Description copied from interface:
EntityToValue
- Convert an iterable of entities to an iterable of values with an opportunity to customize their prototypes.
- Specified by:
convert
in interface EntityToValue
- Type Parameters:
T
- parametrized type of the value- Parameters:
valueType
- type of the valueentities
- the entities to convert to valuesprototypeOpportunity
- a Function that will be mapped on each of the value prototypes before instanciation.
- Returns:
- the resulting values