polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Merlin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZEST-36) Java 8 Predicates to be used for Constraints?
Date Fri, 26 Jun 2015 07:52:04 GMT

    [ https://issues.apache.org/jira/browse/ZEST-36?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602526#comment-14602526

Paul Merlin commented on ZEST-36:

Java 8 Predicate and Qi4j Specification are very similar. Could we apply your thought about
Constraints with Specification? Could we totally remove Specification and use Predicate instead?

> Java 8 Predicates to be used for Constraints?
> ---------------------------------------------
>                 Key: ZEST-36
>                 URL: https://issues.apache.org/jira/browse/ZEST-36
>             Project: Zest
>          Issue Type: Improvement
>            Reporter: Niclas Hedhman
> In Java 8, the Predicate class is suitable to be used for Constraints. And I think we
should leverage the versatility of this on Ver 3.0
> The difference is that the Predicate.test() method is lacking the Annotation argument,
which often used to pass arguments to the constraint. But we can equally easily inject the
annotation instead.
> I think that that org.qi4j.api.constraint.Constraint class has no purpose, other than
for compatibility reason, but I might be wrong.

This message was sent by Atlassian JIRA

View raw message