<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">The problem I quickly ran into is: With Java generics you can only
implement that interface once. You can't implement the interface
multiple times in a given class, merely by changing the generically
parametrized type. So you can't have say a single EntityIdCriterion
class that matches(EntityDescriptor), matches(RoleDescriptor),
matches(Credential), etc.<br></div></blockquote><div><br></div><div>Offhand, it seems there's an easy solution: make three different Criterion classes, one for each type, then give CriteriaSet intelligence to do any/all/other combinations for multiple matches. I guess I'm making an academic argument at this point since I clearly haven't spent as much time as you have, so I'll just trust that the current design is best for the given cases.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
This is important b/c sometime criteria are created by a caller that
doesn't know what it's going to be evaluated against</div></blockquote><div><br></div><div>That seems odd to me. What's the point of caller having control over criteria if he/she doesn't know what types are in play for criteria evaluation?</div><div> </div><div>M</div><div><br></div></div></div>