de.caff.generics.converter

## Class ReferencingTypeConverter<T,R extends java.lang.ref.Reference<? super T>>

- java.lang.Object
- - de.caff.generics.converter.ReferencingTypeConverter<T,R>

- All Implemented Interfaces:
    Function1<R,T>, java.util.function.Function<T,R>

      public class ReferencingTypeConverter<T,R extends java.lang.ref.Reference<? super T>>
      extends java.lang.Object
      implements Function1<R,T>

  Type converter which wraps the object with an reference.
  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReferencingTypeConverter(ReferenceCreator<R,T> referenceCreator)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `R` | `apply(T object)` Convert an object to another type.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface de.caff.generics.function.Function1

      `after, andThen, applyNonNull, applyOrDefault, fallback, fallback, from, from, nonFragile, nonFragile, nonFragileX, partial, withFallback`

    - ### Methods inherited from interface java.util.function.Function

      `compose, identity`

- - ### Constructor Detail

    - #### ReferencingTypeConverter

          public ReferencingTypeConverter(ReferenceCreator<R,T> referenceCreator)

      Constructor.
      Parameters:
        `referenceCreator` - reference creator

  - ### Method Detail

    - #### apply

          public R apply(T object)

      Convert an object to another type.
      Specified by:
        `apply` in interface `java.util.function.Function<T,R extends java.lang.ref.Reference<? super T>>`
      Parameters:
        `object` - object to convert
      Returns:
        target object