Interface AdaptFactory<A,​O>


  • public interface AdaptFactory<A,​O>
    Utility class that adapts objects for the delegate objects.
    Author:
    Daniel Sagenschneider
    • Method Detail

      • adaptObject

        static <A,​O> A adaptObject​(O delegateObject,
                                         AdaptFactory<A,​O> adaptFactory)
        Adapts the object.
        Type Parameters:
        A - Required type.
        O - Original type.
        Parameters:
        delegateObject - Delegate object.
        adaptFactory - AdaptFactory.
        Returns:
        Adapted object.
      • adaptArray

        static <A,​O> A[] adaptArray​(O[] delegateArray,
                                          java.lang.Class<A> adaptComponentType,
                                          AdaptFactory<A,​O> adaptFactory)
        Adapts the array.
        Type Parameters:
        A - Required type.
        O - Original type.
        Parameters:
        delegateArray - Array of delegate objects.
        adaptComponentType - Adapt component type.
        adaptFactory - AdaptFactory.
        Returns:
        Adapted array.
      • createAdaptedObject

        A createAdaptedObject​(O delegate)
        Creates the adapted object for the delegate object.
        Parameters:
        delegate - Delegate object to wrap.
        Returns:
        Adapted object.