Class Enumerations
java.lang.Object
org.apache.tools.ant.taskdefs.optional.junit.Enumerations
Deprecated.
A couple of methods related to enumerations that might be useful.
This class should probably disappear once the required JDK is set to 1.2
instead of 1.1.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Enumeration<T>
fromArray
(T... array) Deprecated.use Collections.enumeration(Arrays.asList(array))static <T> Enumeration<T>
fromCompound
(Enumeration<? extends T>... enums) Deprecated.use Stream.concat(Collections.list(one).stream(), Collections.list(two).stream()) .collect(Collectors.collectingAndThen(Collectors.toList(), Collections::enumeration))
-
Method Details
-
fromArray
Deprecated.use Collections.enumeration(Arrays.asList(array))creates an enumeration from an array of objects.- Type Parameters:
T
- object type- Parameters:
array
- the array of object to enumerate.- Returns:
- the enumeration over the array of objects.
-
fromCompound
@Deprecated @SafeVarargs public static <T> Enumeration<T> fromCompound(Enumeration<? extends T>... enums) Deprecated.use Stream.concat(Collections.list(one).stream(), Collections.list(two).stream()) .collect(Collectors.collectingAndThen(Collectors.toList(), Collections::enumeration))creates an enumeration from an array of enumeration. The created enumeration will sequentially enumerate over all elements of each enumeration and skipnull
enumeration elements in the array.- Type Parameters:
T
- object type- Parameters:
enums
- the array of enumerations.- Returns:
- the enumeration over the array of enumerations.
-