|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.emf.emfstore.internal.common.APIUtil
public final class APIUtil
Convenience class for mapping internal and external types contained in lists onto each other.
| Method Summary | ||
|---|---|---|
static
|
copy(List<T> toCopy)
Copies the given list. |
|
static
|
mapToAPI(Class<V> apiClass,
List<T> toCopy)
Maps a list of a given internal type to its corresponding API type by copying it. |
|
static
|
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
|
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
|
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
|
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
|
toInternal(Class<T> apiClass,
V element)
Maps an given API type to its internal API counterpart. |
|
static
|
toInternal(List<API> toCopy)
Maps a list of a given API type to its internal API counterpart by copying and mapping the entities. |
|
static
|
toInternal(Set<API> toCopy)
Maps a set of a given API type to its internal API counterpart by copying and mapping the entities. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> List<T> copy(List<T> toCopy)
T - the type of the instances the list is holdingtoCopy - the list to be copied
public 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 type
public 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 type
public 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 type
public 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 type
public 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 copied
public 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 copied
public 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 type
public 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 mapped
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||