Class FieldLocation
java.lang.Object
org.assertj.core.api.recursive.comparison.FieldLocation
- All Implemented Interfaces:
Comparable<FieldLocation>
Represents the path to a given field. Immutable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(FieldLocation other) boolean
boolean
hasChild
(FieldLocation child) Returns true if this field has the given child (direct or indirect), false otherwise.int
hashCode()
boolean
hasParent
(FieldLocation parent) Returns true if this has the given parent (direct or indirect), false otherwise.boolean
boolean
matches
(FieldLocation field) static FieldLocation
toString()
-
Constructor Details
-
FieldLocation
-
FieldLocation
-
-
Method Details
-
matches
-
matches
-
getDecomposedPath
-
getPathToUseInRules
-
field
-
compareTo
- Specified by:
compareTo
in interfaceComparable<FieldLocation>
-
equals
-
hashCode
public int hashCode() -
toString
-
shortDescription
-
getPathToUseInErrorReport
-
getFieldName
-
rootFieldLocation
-
hasParent
Returns true if this has the given parent (direct or indirect), false otherwise.Examples:
| field | parent | hasParent? ----------------------------------------------- | "name.first" | "name" | true | "name.first.nickname" | "name" | true | "name.first.nickname" | "name.first" | true | "name" | "name" | false | "names" | "name" | false | "nickname" | "name" | false | "name" | "nickname" | false | "first.nickname" | "name" | false
- Parameters:
parent
- the field to check for being a parent- Returns:
- true if this has the given parent (direct or indirect), false otherwise.
-
hasChild
Returns true if this field has the given child (direct or indirect), false otherwise.Examples:
| field | child | hasChild? ----------------------------------------------- | "name" | "name.first" | true | "name" | "name.last" | true | "one" | "one.two.three" | true | "name.first" | "name " | false | "name" | "name" | false | "names" | "name" | false | "nickname" | "name" | false | "name" | "nickname" | false | "first.nickname" | "name" | false
- Parameters:
child
- the field to check for being a child- Returns:
- true if this has the given child (direct or indirect), false otherwise.
-