<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Greg Barton wrote:
<blockquote cite="mid:858762.49357.qm@web81502.mail.mud.yahoo.com"
 type="cite">
  <pre wrap="">--- On Mon, 9/29/08, Mark Proctor <a class="moz-txt-link-rfc2396E" href="mailto:mproctor@codehaus.org">&lt;mproctor@codehaus.org&gt;</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Another decision we made is that we always return a generic
collection for things now, instead of arrays or lists. In general a
Collection is easier for the end user to work with, and it has toArray
methods on it anyway. We didn't use list, as list implies ordered
semantics. So whether it's kbuilder.KnowledgePackages() or
kpackage.getRules() or kpackage.getProcesses() it's always returning a
Collection&lt;Class&gt;. 
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Will the Class be constrained?  i.e. Collection&lt;Class&lt;? extends Foo&gt;&gt;
  </pre>
</blockquote>
We can't extend for user objects, as we don't know the class of the
user objects, but it will be for when we know the type - like
FactHandle etc.<br>
<blockquote cite="mid:858762.49357.qm@web81502.mail.mud.yahoo.com"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">I'm open to other ideas, if people think this can be improved.
I did think about returning just Iterable, to make it even more
generic, but figured that people would want the size./isEmpty methods, 
we'll have to make the other mutating methods throw an exception if 
someone tries to use them.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Collection is best.  Wrap in Collections.unmodifiableCollection() if necessary.


      
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>

  </pre>
</blockquote>
<br>
</body>
</html>