commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@gmail.com>
Subject Re: svn commit: r1076446 - in /commons/sandbox/functor/trunk/src: main/java/org/apache/commons/functor/core/collection/FilteredIterable.java test/java/org/apache/commons/functor/core/collection/TestFilteredIterable.java
Date Thu, 03 Mar 2011 00:22:13 GMT

On Mar 2, 2011, at 6:19 PM, sebb wrote:

> On 2 March 2011 22:55,  <mbenson@apache.org> wrote:
>> Author: mbenson
>> Date: Wed Mar  2 22:55:02 2011
>> New Revision: 1076446
>> 
>> URL: http://svn.apache.org/viewvc?rev=1076446&view=rev
>> Log:
>> add FilteredIterable
[SNIP]

>> +public class FilteredIterable<T> implements Iterable<T> {
>> +    @SuppressWarnings({ "rawtypes", "unchecked" })
>> +    // type irrelevant for empty instance
>> +    private static final FilteredIterable EMPTY = new FilteredIterable(Collections.EMPTY_LIST)
{
> 
> BTW, using Collections.emptyList() instead should allow the @Suppress
> tag to be removed.
> 

Except that the local instance is itself a raw instance of the containing parameterized type.
 ;)

Matt

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message