Class FieldComparators
- java.lang.Object
-
- org.assertj.core.api.recursive.comparison.FieldComparators
-
public class FieldComparators extends Object
An internal holder of the comparators for fields described withFieldLocation
.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Map<FieldLocation,Comparator<?>>
fieldComparators
-
Constructor Summary
Constructors Constructor Description FieldComparators()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<Map.Entry<FieldLocation,Comparator<?>>>
comparatorByFields()
boolean
equals(Object obj)
private static String
formatRegisteredComparator(Map.Entry<FieldLocation,Comparator<?>> fieldComparator)
Comparator<?>
getComparatorForField(FieldLocation fieldLocation)
boolean
hasComparatorForField(FieldLocation fieldLocation)
int
hashCode()
boolean
isEmpty()
void
registerComparator(FieldLocation fieldLocation, Comparator<?> comparator)
Puts thecomparator
for the givenclazz
.String
toString()
-
-
-
Field Detail
-
fieldComparators
Map<FieldLocation,Comparator<?>> fieldComparators
-
-
Method Detail
-
registerComparator
public void registerComparator(FieldLocation fieldLocation, Comparator<?> comparator)
Puts thecomparator
for the givenclazz
.- Parameters:
fieldLocation
- the FieldLocation where to apply the comparatorcomparator
- the comparator it self
-
isEmpty
public boolean isEmpty()
- Returns:
true
is there are registered comparators,false
otherwise
-
formatRegisteredComparator
private static String formatRegisteredComparator(Map.Entry<FieldLocation,Comparator<?>> fieldComparator)
-
hasComparatorForField
public boolean hasComparatorForField(FieldLocation fieldLocation)
-
getComparatorForField
public Comparator<?> getComparatorForField(FieldLocation fieldLocation)
-
comparatorByFields
public Stream<Map.Entry<FieldLocation,Comparator<?>>> comparatorByFields()
-
-