- java.lang.Object
-
- org.scijava.types.extract.SubTypeExtractor<Iterable<?>>
-
- org.scijava.types.extract.IterableTypeExtractor
-
- All Implemented Interfaces:
Comparable<TypeExtractor>,Prioritized<TypeExtractor>,TypeExtractor
public class IterableTypeExtractor extends SubTypeExtractor<Iterable<?>>
TypeExtractorplugin which operates onIterableobjects.In an attempt to balance performance and correctness, we examine the first 100 elements of the iteration and obtain the greatest common supertype of each.
- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description IterableTypeExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>baseClass()protected Type[]getTypeParameters(TypeReifier r, Iterable<?> object)Returns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass().doublepriority()-
Methods inherited from class org.scijava.types.extract.SubTypeExtractor
reify
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.priority.Prioritized
compareTo
-
-
-
-
Method Detail
-
priority
public double priority()
-
baseClass
public Class<?> baseClass()
-
getTypeParameters
protected Type[] getTypeParameters(TypeReifier r, Iterable<?> object)
Description copied from class:SubTypeExtractorReturns aTypearray, where theithTypein the array is theith type parameter of theClassreturned byTypeExtractor.baseClass(). Similar toParameterizedType.getActualTypeArguments(), but works onObjects instead ofParameterizedTypes.- Specified by:
getTypeParametersin classSubTypeExtractor<Iterable<?>>- Parameters:
r- theTypeReifierused to reify the type parameters.object- theObjectto extract type parameters from.- Returns:
- the actual type arguments of
Object, with respect to theTypereturned byTypeExtractor.baseClass() - See Also:
ParameterizedType.getActualTypeArguments()
-
-