You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/04/27 16:38:08 UTC
DO NOT REPLY [Bug 28629] -
CollectionUtils.cardinality should be made smarter about Bag
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28629>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28629
CollectionUtils.cardinality should be made smarter about Bag
------- Additional Comments From jon.schewe@honeywell.com 2004-04-27 14:38 -------
The simple change for this would be:
public static int cardinality(Object obj, final Collection col) {
if(col instanceof Bag) {
return ((Bag)col).getCount(obj);
} else {
//put the current body here
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org