Package eu.bandm.tools.umod.runtime
Class CollectionFactory
java.lang.Object
eu.bandm.tools.umod.runtime.CollectionFactory
Utility class which holds the factory methods for all collection
classes needed by a umod model.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A> List<A> Factory method.static <A,B> Map <A, B> Factory method.static <A,B> Multimap <A, B> newMultimap(Class<?> classA, Class<?> classB) Factory method.static <A,B> NonNullKeyMap <A, B> newNonNullKeyMap(Class<A> classA, Class<B> classB) Factory method.static <A> NonNullList<A> newNonNullList(Class<?> elementClass) Factory method.static <A,B> NonNullMap <A, B> newNonNullMap(Class<?> classA, Class<?> classB) Factory method.static <A> NonNullSet<A> newNonNullSet(Class<?> elementClass) Factory method.static <A,B> NonNullValueMap <A, B> newNonNullValueMap(Class<?> classA, Class<?> classB) Factory method.static <A> Set<A> Factory method.
-
Method Details
-
newNonNullList
Factory method.- Type Parameters:
A- the type of the contained elements.- Parameters:
elementClass- the class of the contained elements. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newNonNullSet
Factory method.- Type Parameters:
A- the type of the contained elements.- Parameters:
elementClass- the class of the contained elements. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newNonNullMap
Factory method.- Type Parameters:
A- the type of the contained keys,B- the type of the contained values.- Parameters:
classA- the classes of the contained keys. (Its type parameter is intentionally not related to the result type.classB- the classes of the contained values. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newNonNullKeyMap
Factory method.- Type Parameters:
A- the type of the contained keys,B- the type of the contained values.- Parameters:
classA- the classes of the contained keys. (Its type parameter is intentionally not related to the result type.classB- the classes of the contained values. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newNonNullValueMap
Factory method.- Type Parameters:
A- the type of the contained keys,B- the type of the contained values.- Parameters:
classA- the classes of the contained keys. (Its type parameter is intentionally not related to the result type.classB- the classes of the contained values. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newList
Factory method.- Type Parameters:
A- the type of the contained elements.- Parameters:
elementClass- the class of the contained elements. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newSet
Factory method.- Type Parameters:
A- the type of the contained elements.- Parameters:
elementClass- the class of the contained elements. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newMap
Factory method.- Type Parameters:
A- the type of the contained keys,B- the type of the contained values.- Parameters:
classA- the classes of the contained keys. (Its type parameter is intentionally not related to the result type.classB- the classes of the contained values. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-
newMultimap
Factory method.- Type Parameters:
A- the type of the left-side values.B- the type of the right-side values.- Parameters:
classA- the classes of the left-side values. (Its type parameter is intentionally not related to the result type.classB- the classes of the right-side values. (Its type parameter is intentionally not related to the result type.- Returns:
- the new created and empty collection.
-