Any chance to see EnumSet implement SortedSet in JDK8?
David Schlosnagle
schlosna at gmail.com
Fri Aug 12 16:24:04 UTC 2011
On Fri, Aug 12, 2011 at 9:06 AM, Rémi Forax <forax at univ-mlv.fr> wrote:
> On 08/12/2011 02:46 PM, mike.skells at talk21.com wrote:
>>
>> Hi Remi,
>> Your argument is flawed
>>
>> The complexity of the operations is not defined by the interface or the
>> presence or absence of the interface
>
> In theory yes, but in practice ...
> What is the purpose of java.util.RandomAccess ?
>
>> If you have complexity algo checks then these can only be applied to known
>> classes where the complexity is defined in the interface or class
>>
>> As such the code that infers this behaviour is broken and needs to be
>> fixed.
>
> Ok, how to remove the instanceof RandomAccess in Collections.shuffle (by
> example).
Does anyone know if there has ever been a proposal or experiments to
use annotations to provide algorithmic complexity information for a
given method implementation? This might be an interesting experiment
rather than adding marker interfaces that apply to an entire class.
- Dave
More information about the core-libs-dev
mailing list