commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Warren <cla...@xenei.com>
Subject Re: [collections] New iterator/iterable methods
Date Thu, 11 Jan 2018 07:45:19 GMT
does first return the first object or the first non-null object?

If the first object how do you distinguish between first() returning a null
object and there being an empty container?
If the first non-null object how do you determine that nulls were skipped?

Keep in mind that the Optional implementation in Java8 will throw an
exception if it is constructed with a null object.

On Wed, Jan 10, 2018 at 4:45 PM, Gary Gregory <garydgregory@gmail.com>
wrote:

> Hi All,
>
> I plan on adding methods like:
> - IteratorUtils.first(Iterator)
> - IterableUtils.first(Iterable)
>
> Gary
>



-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message