directory-kerby mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <>
Subject Re: How to implement getIdentities(int start, int limit) more effectively
Date Mon, 06 Jul 2015 05:35:21 GMT
Le 06/07/15 07:06, Zheng, Kai a écrit :
> Yaning,
> How about going on with this simple API change, as previously proposed by Stefan? I thought
it can server well the same purpose for cursor.
> List<String> getIdentities(int start, int limit)
> =>
> Iterator<String> getIdentities()

I'll suggest - again - a different approach :
- either you return a cursor
- or you keep the List<String>

Here is why : Cursor already implements Iterable, so if you drink the
cool aid fully, you'll get the equivalent to what you propose.

But if you consider it's still too much work, then, please, keep it
simple and use List<String> getIdentiies() at the moment.

View raw message