DATACMNS-900 - Added equals(…) and hashCode() methods for ExampleMatcher utility classes.
We now provide equals(…) and hashCode() methods for GenericPropertyMatcher, PropertySpecifier and PropertySpecifiers so that they can be compared and used in sets. Original pull request: #175.
This commit is contained in:
committed by
Oliver Gierke
parent
b7f4709b7c
commit
ac51b1671d
@@ -389,6 +389,7 @@ public class ExampleMatcher {
|
||||
*
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
@EqualsAndHashCode
|
||||
public static class GenericPropertyMatcher {
|
||||
|
||||
StringMatcher stringMatcher = null;
|
||||
@@ -686,10 +687,12 @@ public class ExampleMatcher {
|
||||
* Define specific property handling for a Dot-Path.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @since 1.12
|
||||
*/
|
||||
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@EqualsAndHashCode
|
||||
public static class PropertySpecifier {
|
||||
|
||||
String path;
|
||||
@@ -798,8 +801,10 @@ public class ExampleMatcher {
|
||||
* Define specific property handling for Dot-Paths.
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Mark Paluch
|
||||
* @since 1.12
|
||||
*/
|
||||
@EqualsAndHashCode
|
||||
public static class PropertySpecifiers {
|
||||
|
||||
private final Map<String, PropertySpecifier> propertySpecifiers = new LinkedHashMap<String, PropertySpecifier>();
|
||||
|
||||
Reference in New Issue
Block a user