Class FieldHolder<T>
java.lang.Object
org.assertj.core.api.recursive.comparison.FieldHolder<T>
- Type Parameters:
T- entity type
- Direct Known Subclasses:
FieldComparators,FieldMessages
An abstract field holder which provides to pair a specific entities for fields described by their path without
element index.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a sequence of all field-entry pairs which the current holder supplies.booleanprivate static <T> StringformatRegisteredEntity(Map.Entry<String, T> entry) Retrieves a specific entity which is associated with the givingfiledLocationfrom the field holder, if it presents.booleanChecks, whether an any entity associated with the giving field location.inthashCode()booleanisEmpty()voidPairs the givingentitywith thefieldLocation.toString()
-
Field Details
-
fieldHolder
-
-
Constructor Details
-
FieldHolder
public FieldHolder()
-
-
Method Details
-
put
Pairs the givingentitywith thefieldLocation.- Parameters:
fieldLocation- the field location where to apply the giving entityentity- the entity to pair
-
get
Retrieves a specific entity which is associated with the givingfiledLocationfrom the field holder, if it presents. Otherwise, this method returnsnull.- Parameters:
fieldLocation- the field location which has to be associated with an entity- Returns:
- entity or null
-
hasEntity
Checks, whether an any entity associated with the giving field location.- Parameters:
fieldLocation- the field location which association need to check- Returns:
- is entity associated with field location
-
isEmpty
public boolean isEmpty()- Returns:
trueis there are registered entities,falseotherwise
-
entryByField
Returns a sequence of all field-entry pairs which the current holder supplies.- Returns:
- sequence of field-entry pairs
-
toString
-
formatRegisteredEntity
-
equals
-
hashCode
public int hashCode()
-