Re: [LANG] 3.0 StrTokenizer API change for next()

2009-03-15 Thread Henri Yandell
On Sun, Mar 15, 2009 at 9:36 AM, sebb  wrote:
> On 15/03/2009, sebb  wrote:
>> StrTokenizer implements ListIterator currently.
>>
>>  Given that it only deals in Strings, it could implement
>>  ListIterator, however that would mean changing
>>
>>  public Object next()
>>
>>  to
>>
>>  public String next()
>>
>
> Oops I forgot about previous().
> Also add() and set(), which throw UnsupportedOperationException.
>
>>  Any objections to implementing the above?

No objections. +1.

Hen

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



Re: [LANG] 3.0 StrTokenizer API change for next()

2009-03-15 Thread Matt Benson



--- On Sun, 3/15/09, sebb  wrote:

> From: sebb 
> Subject: [LANG] 3.0 StrTokenizer API change for next()
> To: "Commons Developers List" 
> Date: Sunday, March 15, 2009, 11:31 AM
> StrTokenizer implements ListIterator
> currently.
> 
> Given that it only deals in Strings, it could implement
> ListIterator, however that would mean
> changing
> 
> public Object next()
> 
> to
> 
> public String next()
> 
> Any objections to implementing the above?
> 

1. A String _is_ an Object; I am convinced that narrowed return types are the 
right thing to do in Java5-compatible code.  What reason could there be against 
it?
2. We have no obligation to be BC anyway.

-Matt

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


  

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



Re: [LANG] 3.0 StrTokenizer API change for next()

2009-03-15 Thread sebb
On 15/03/2009, sebb  wrote:
> StrTokenizer implements ListIterator currently.
>
>  Given that it only deals in Strings, it could implement
>  ListIterator, however that would mean changing
>
>  public Object next()
>
>  to
>
>  public String next()
>

Oops I forgot about previous().
Also add() and set(), which throw UnsupportedOperationException.

>  Any objections to implementing the above?
>

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



[LANG] 3.0 StrTokenizer API change for next()

2009-03-15 Thread sebb
StrTokenizer implements ListIterator currently.

Given that it only deals in Strings, it could implement
ListIterator, however that would mean changing

public Object next()

to

public String next()

Any objections to implementing the above?

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