commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: [collections] unclear contract for LRUMap.setMaximumSize(int)
Date Wed, 20 Feb 2002 03:49:13 GMT

----- Original Message -----
From: "Morgan Delagrange" <mdelagra@yahoo.com>
> Hi all,
>
> This is strange.  What is the proper behaviour of the
> LRUMap.setMaximumSize(int) method, do you think?  One would assume that,
if
> the current LRUMap has more keys than the new maximum size, the LRUMap
would
> trim excess keys according to the LRU algorithm.  But right now, all it
> appears to do is maintain the current size.  The Javadocs do not indicate
> one way or the other.

I guess since its vague right now this could go either way :)

My gut feel is with the former, that the map shrinks if the new max size is
smaller than the currrent size.

James


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message