public final class APIUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
copy(List<T> toCopy)
Copies the given list.
|
static <T extends APIDelegate<U>,V,U extends V> |
mapToAPI(Class<V> apiClass,
List<T> toCopy)
Maps a list of a given internal type to its corresponding API type by copying it.
|
static <V,U extends InternalAPIDelegator<U,T>,T extends APIDelegate<U>> |
mapToInternalAPI(Class<T> apiClass,
List<V> toCopy)
Maps a list of a given external API type to its corresponding internal type by copying it.
|
static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> |
toExternal(List<INT> toCopy)
Maps a list of a given internal API type to its external API counterpart by copying and mapping the entities.
|
static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> |
toExternal(Set<INT> toCopy)
Maps a set of a given internal API type to its external API counterpart by copying and mapping the entities.
|
static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API,DESIRED> |
toInternal(Class<DESIRED> cls,
List<API> toCopy)
Maps a list of a given internal API type to its external API counterpart by copying and mapping the entities.
|
static <V,U extends InternalAPIDelegator<U,T>,T extends APIDelegate<U>> |
toInternal(Class<T> apiClass,
V element)
Maps an given API type to its internal API counterpart.
|
static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> |
toInternal(List<API> toCopy)
Maps a list of a given API type to its internal API counterpart by copying and mapping the entities.
|
static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> |
toInternal(Set<API> toCopy)
Maps a set of a given API type to its internal API counterpart by copying and mapping the entities.
|
public static <T> List<T> copy(List<T> toCopy)
T - the type of the instances the list is holdingtoCopy - the list to be copiedpublic static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> List<INT> toInternal(List<API> toCopy)
INT - the internal API mapping to an API implementation classAPI - the type of the API interfaceIMPL - the type of the API implementation classtoCopy - the list to be copied and mapped to the internal API typepublic static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API,DESIRED> List<INT> toInternal(Class<DESIRED> cls, List<API> toCopy)
DESIRED - the internal API typeINT - the internal API mapping to an API implementation classAPI - the type of the API interfaceIMPL - the type of the API implementation classcls - the desired internal API typetoCopy - the list to be copied and mapped to the external API typepublic static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> List<API> toExternal(List<INT> toCopy)
INT - the internal API mapping to an API implementation classAPI - the type of the API interfaceIMPL - the type of the API implementation classtoCopy - the list to be copied and mapped to the external API typepublic static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> Set<API> toExternal(Set<INT> toCopy)
INT - the internal API mapping to an API implementation classAPI - the type of the API interfaceIMPL - the type of the API implementation classtoCopy - the set to be copied and mapped to the external API typepublic static <T extends APIDelegate<U>,V,U extends V> List<V> mapToAPI(Class<V> apiClass, List<T> toCopy)
T - the internal API mapping to an API implementation classV - the type of the API interfaceU - the type of the API implementation classapiClass - the desired API typetoCopy - the list to be copiedpublic static <V,U extends InternalAPIDelegator<U,T>,T extends APIDelegate<U>> List<T> mapToInternalAPI(Class<T> apiClass, List<V> toCopy)
T - the internal API mapping to an API implementation classV - the type of the API interfaceU - the type of the API implementation classapiClass - the desired API typetoCopy - the list to be copiedpublic static <IMPL extends InternalAPIDelegator<API,INT>,INT extends APIDelegate<API>,API> Set<INT> toInternal(Set<API> toCopy)
INT - the internal API mapping to an API implementation classAPI - the type of the API interfaceIMPL - the type of the API implementation classtoCopy - the set to be copied and mapped to the internal API typepublic static <V,U extends InternalAPIDelegator<U,T>,T extends APIDelegate<U>> T toInternal(Class<T> apiClass, V element)
T - the internal API mapping to an API implementation classV - the type of the API interfaceU - the type of the API implementation classapiClass - the desired API typeelement - the type to be mappedCopyright © 2017. All rights reserved.