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 Object
      implements EntityToValue

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.library.conversion.values.EntityToValue

      `EntityToValue.EntityToValueMixin`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityToValue.EntityToValueMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> Iterable<T>` | `convert(Class<T> valueType, Iterable<Object> entities)` Convert an iterable of entities to an iterable of values.
    `<T> Iterable<T>` | `convert(Class<T> valueType, Iterable<Object> entities, Function<T,T> prototypeOpportunity)` Convert an iterable of entities to an iterable of values with an opportunity to customize their prototypes.
    `<T> T` | `convert(Class<T> valueType, Object entity)` Convert an entity to a value.
    `<T> T` | `convert(Class<T> valueType, 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`

- - ### Constructor Detail

    - #### EntityToValue.EntityToValueMixin

          public EntityToValue.EntityToValueMixin()

  - ### Method Detail

    - #### convert

          public <T> T convert(Class<T> valueType,
                      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 value
        `entity` - the entity to convert to a value
      Returns:
        the resulting value

    - #### convert

          public <T> T convert(Class<T> valueType,
                      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 value
        `entity` - the entity to convert to a value
        `prototypeOpportunity` - a Function that will be mapped on the value prototype before instanciantion
      Returns:
        the resulting value

    - #### convert

          public <T> Iterable<T> convert(Class<T> valueType,
                                Iterable<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 value
        `entities` - the entities to convert to values
      Returns:
        the resulting values

    - #### convert

          public <T> Iterable<T> convert(Class<T> valueType,
                                Iterable<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 value
        `entities` - the entities to convert to values
        `prototypeOpportunity` - a Function that will be mapped on each of the value prototypes before instanciation.
      Returns:
        the resulting values