public class FieldsOrPropertiesExtractor
extends java.lang.Object
You just have to give the field/property name or a Function
implementation, a collection/array of objects
and it will extract the list of field/values from the given objects.
Constructor and Description |
---|
FieldsOrPropertiesExtractor() |
Modifier and Type | Method and Description |
---|---|
private static void |
checkObjectToExtractFromIsNotNull(java.lang.Object object) |
static <F,T> T[] |
extract(F[] objects,
java.util.function.Function<? super F,T> extractor)
Call
extract(Iterable, Function) after converting objects to an iterable. |
static <F,T> java.util.List<T> |
extract(java.lang.Iterable<? extends F> objects,
java.util.function.Function<? super F,T> extractor)
Behavior is described in
AbstractIterableAssert.extracting(Function) |
public static <F,T> T[] extract(F[] objects, java.util.function.Function<? super F,T> extractor)
extract(Iterable, Function)
after converting objects to an iterable.
Behavior is described in javadoc AbstractObjectArrayAssert.extracting(Function)
F
- type of elements to extract a value fromT
- the extracted value typeobjects
- the elements to extract a value fromextractor
- the extractor functionpublic static <F,T> java.util.List<T> extract(java.lang.Iterable<? extends F> objects, java.util.function.Function<? super F,T> extractor)
AbstractIterableAssert.extracting(Function)
F
- type of elements to extract a value fromT
- the extracted value typeobjects
- the elements to extract a value fromextractor
- the extractor functionprivate static void checkObjectToExtractFromIsNotNull(java.lang.Object object)