org.assertj.core.groups
Class FieldsOrPropertiesExtractor

java.lang.Object
  extended by org.assertj.core.groups.FieldsOrPropertiesExtractor

public class FieldsOrPropertiesExtractor
extends Object

Understands how to retrieve fields or values from a collection/array of objects.

You just have to give the field/property name or an Extractor implementation, a collection/array of objects and it will extract the list of field/values from the given objects.

Author:
Joel Costigliola, Mateusz Haligowski

Constructor Summary
FieldsOrPropertiesExtractor()
           
 
Method Summary
static
<F,T> T[]
extract(F[] objects, Extractor<? super F,T> extractor)
          Call extract(Iterable, Extractor) after converting objects to an iterable.
static
<F,T> List<T>
extract(Iterable<? extends F> objects, Extractor<? super F,T> extractor)
          Behavior is described in AbstractIterableAssert.extracting(Extractor)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldsOrPropertiesExtractor

public FieldsOrPropertiesExtractor()
Method Detail

extract

public static <F,T> T[] extract(F[] objects,
                                Extractor<? super F,T> extractor)
Call extract(Iterable, Extractor) after converting objects to an iterable.

Behavior is described in javadoc AbstractObjectArrayAssert.extracting(Extractor)


extract

public static <F,T> List<T> extract(Iterable<? extends F> objects,
                                    Extractor<? super F,T> extractor)
Behavior is described in AbstractIterableAssert.extracting(Extractor)



Copyright © 2013–2015 AssertJ. All rights reserved.