Interface AdaptFactory<A,O>
-
public interface AdaptFactory<A,O>
Utility class that adapts objects for the delegate objects.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <A,O>
A[]adaptArray(O[] delegateArray, java.lang.Class<A> adaptComponentType, AdaptFactory<A,O> adaptFactory)
Adapts the array.static <A,O>
AadaptObject(O delegateObject, AdaptFactory<A,O> adaptFactory)
Adapts the object.A
createAdaptedObject(O delegate)
Creates the adapted object for the delegate object.
-
-
-
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.
-
-