You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Cousnouf (via GitHub)" <gi...@apache.org> on 2023/10/02 09:21:03 UTC

Re: [PR] Add TypedEqualsBuilder class and test [commons-lang]

Cousnouf commented on PR #1114:
URL: https://github.com/apache/commons-lang/pull/1114#issuecomment-1742677530

   Hello all,
   
   I've added some changes to address your comments.
   
   It's still in a separate class as I think it's better to separate the
   concept of EqualsBuilder with concrete values passed each time with append
   and the concept of TypedEqualsBuilder which receive the two objects in the
   construction and then calls the failable function during each appending.
   
   Inputs welcome :)
   
   Regards,
   
   Marc
   
   Le jeu. 28 sept. 2023 à 15:39, Gary Gregory ***@***.***> a
   écrit :
   
   > ***@***.**** commented on this pull request.
   > ------------------------------
   >
   > In src/main/java/org/apache/commons/lang3/builder/TypedEqualsBuilder.java
   > <https://github.com/apache/commons-lang/pull/1114#discussion_r1340174101>:
   >
   > > + * <p>Typical use for the code is as follows:</p>
   > + * <pre>
   > + * public boolean equals(Object obj) {
   > + *     return new TypedEqualsBuilder<>(this)
   > + *         .appendBaseObject(obj)
   > + *         .append(TestObject::getA)
   > + *         .append(TestObject::getB)
   > + *         .isEquals();
   > + *     }
   > + * </pre>
   > + *
   > + * @param <T> the type of the compared object.
   > + *
   > + * @since 3.14.0
   > + */
   > +public class TypedEqualsBuilder<T> extends EqualsBuilder {
   >
   > It is the class type. its refering to the T class parameter which is
   > supported by this Builder subtype.
   >
   > ✅️ Thanks for pointing that out! 👍
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/commons-lang/pull/1114#discussion_r1340174101>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/AATRSC2QF3DIIJVO5GMIKO3X4V4ZLANCNFSM6AAAAAA5FT7FAY>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org