So you are saying you need this?

public interface IDataProvider<I,M>
 extends IDetachable
{
 java.util.Iterator<I> iterator(int first, int count);
 IModel<M> model(I object);
 int size();
}

then everbody has to create an iterator with 2 and 90+% of the cases it
would be
IDataProvider<Person,Person>

thats not so nice :(

johan


On Wed, Apr 23, 2008 at 9:46 AM, Jan Kriesten <[EMAIL PROTECTED]>
wrote:

>
> hi,
>
> i stumbled over the generification of the IDataProvider, which IMHO
> doesn't make sense as it is now:
>
> public interface IDataProvider<T>
>  extends IDetachable
> {
>  java.util.Iterator<T> iterator(int first, int count);
>  IModel<T> model(java.lang.Object object);
>  int size();
> }
>
> this would mean, that the Iterator + the IModel would contain the same
> type information, making it impossible to use an Iterator over Integers and
> lookup those Integer-ids within model to return a User e.g.
>
> best regards, --- jan.
>
>
>

Reply via email to