<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I thought from was effectively typeless (as it&#8217;s operating against a List it can&#8217;t always know the type of the members anyway) and so it allows any type on
 teh left &#8211; giving a runtime class cast exception if it can&#8217;t do the conversion. Therefore if you know they type you are expecting you can still use it on the LHS with whatever constraints you want?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thomas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>Wolfgang Laun<br>
<b>Sent:</b> 25 March 2011 09:23<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] accumulate min over java.util.Date<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Now don't be hasty with a JIRA. Using Comparable for the arguments of the min and max accumulate functions will give you a result that is -- Comparable. So:<br>
<br>
&nbsp; $min: Comparable() from accumulate( Schedule( $d: date ), min( $d ) )<br>
<br>
OK, this will give you the minimum data, bound to $min, although it won't let you write any constraint for the &quot;Comparable&quot; result fact. But, what's worse, it will not let you write<br>
<br>
&nbsp; $min: Number( intValue &gt; 100 ) from accumulate( X( $y: y ), min( $y ) )<br>
<br>
any more (unless I'm very much mistaken).<br>
<br>
-W<br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 25 March 2011 03:56, Greg Barton &lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt; wrote:<o:p></o:p></p>
<p class="MsoNormal">Well, if it can work that way it should. &nbsp;I'd say open a JIRA and request that feature. &nbsp;It works with the &quot;principle of least confusion.&quot; :)<o:p></o:p></p>
<div>
<p class="MsoNormal"><br>
--- On Thu, 3/24/11, jkrupka &lt;<a href="mailto:jkrupka@gmail.com">jkrupka@gmail.com</a>&gt; wrote:<br>
<br>
&gt; From: jkrupka &lt;<a href="mailto:jkrupka@gmail.com">jkrupka@gmail.com</a>&gt;<o:p></o:p></p>
</div>
<p class="MsoNormal">&gt; Subject: Re: [rules-users] accumulate min over java.util.Date<o:p></o:p></p>
<div>
<p class="MsoNormal">&gt; To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><o:p></o:p></p>
</div>
<p class="MsoNormal">&gt; Date: Thursday, March 24, 2011, 8:26 PM<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">&gt; Yea the docs weren't really clear<br>
&gt; about it, so I just thought it would work<br>
&gt; for anything that implemented Comparable =)<br>
&gt;<br>
&gt; Yep, used the long from getTime() - not the prettiest way<br>
&gt; of doing it, but<br>
&gt; it works great.<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html" target="_blank">
http://drools-java-rules-engine.46999.n3.nabble.com/accumulate-min-over-java-util-Date-tp2726081p2728477.html</a><br>
&gt; Sent from the Drools - User mailing list archive at<br>
&gt; Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rules-users mailing list<br>
&gt; <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
&gt;<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data
 may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
</font>
</body>
</html>