Class FieldMessages
java.lang.Object
org.assertj.core.api.recursive.comparison.FieldMessages
An internal holder of the custom messages 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.booleanRetrieves a specific entity which is associated with the givingfiledLocationfrom the field holder, if it presents.getMessageForField(String fieldLocation) Retrieves a custom message, which is associated with the giving field location.booleanChecks, whether an any entity associated with the giving field location.inthashCode()booleanhasMessageForField(String fieldLocation) Checks, whether an any custom message is associated with the giving field location.booleanisEmpty()Returns a sequence of associated field-message pairs.voidPairs the givingentitywith thefieldLocation.voidregisterMessage(String fieldLocation, String message) Pairs the giving errormessagewith thefieldLocation.toString()
-
Field Details
-
fieldHolder
-
-
Constructor Details
-
FieldMessages
public FieldMessages()
-
-
Method Details
-
registerMessage
-
hasMessageForField
Checks, whether an any custom message is associated with the giving field location.- Parameters:
fieldLocation- the field location which association need to check- Returns:
- is field location contain a custom message
-
getMessageForField
Retrieves a custom message, which is associated with the giving field location. If this location does not associate with any custom message - this method returns null.- Parameters:
fieldLocation- the field location that has to be associated with a message- Returns:
- a custom message or null
-
messageByFields
-
put
-
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
-
toString
-
equals
-
hashCode
-