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.boolean
private static <T> String
formatRegisteredEntity
(Map.Entry<String, T> entry) Retrieves a specific entity which is associated with the givingfiledLocation
from the field holder, if it presents.boolean
Checks, whether an any entity associated with the giving field location.int
hashCode()
boolean
isEmpty()
void
Pairs the givingentity
with thefieldLocation
.toString()
-
Field Details
-
fieldHolder
-
-
Constructor Details
-
FieldHolder
public FieldHolder()
-
-
Method Details
-
put
Pairs the givingentity
with 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 givingfiledLocation
from 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:
true
is there are registered entities,false
otherwise
-
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()
-