[jira] [Commented] (COLLECTIONS-403) Make AndPredicate, AnyPredicate etc. not final

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (COLLECTIONS-403) Make AndPredicate, AnyPredicate etc. not final

Walter Laan (Jira)

    [ https://issues.apache.org/jira/browse/COLLECTIONS-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13604732#comment-13604732 ]

Thomas Neidhart commented on COLLECTIONS-403:

The reason these classes are final is because their behavior is well defined and not supposed to be changed by sub-classes.
To prevent sub-classing, they are marked as final.

> Make AndPredicate, AnyPredicate etc. not final
> ----------------------------------------------
>                 Key: COLLECTIONS-403
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-403
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Collection
>    Affects Versions: 3.2.1
>            Reporter: david cogen
>            Priority: Minor
> If there is no good reason for these (and similar classes) to not be final, they would be much more useful to me if they were not final.
> I have a class that I wanted to have an "is a" relation to AnyPredicate, but, AnyPredicate being declared final, I cannot and instead have to design it with a "has a" relation to AnyPredicate, which for my purpose is much less clear.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira