Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 15027 invoked from network); 12 Feb 2007 16:04:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Feb 2007 16:04:38 -0000 Received: (qmail 32575 invoked by uid 500); 12 Feb 2007 16:04:38 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 32527 invoked by uid 500); 12 Feb 2007 16:04:38 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 32516 invoked by uid 99); 12 Feb 2007 16:04:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 08:04:38 -0800 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [63.247.81.241] (HELO tss8.serverconfig.com) (63.247.81.241) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Feb 2007 08:04:27 -0800 Received: from c-76-17-149-224.hsd1.mn.comcast.net ([76.17.149.224] helo=[127.0.0.1]) by tss8.serverconfig.com with esmtpa (Exim 4.63) (envelope-from ) id 1HGdew-0004k6-Up for commons-user@jakarta.apache.org; Mon, 12 Feb 2007 11:04:07 -0500 Message-ID: <45D0900E.3040705@decoursey.net> Date: Mon, 12 Feb 2007 10:04:30 -0600 From: Paul J DeCoursey User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [collection] some support for size-limited List ? References: <93700.91453.qm@web83214.mail.mud.yahoo.com> <4c39e3030702120756w47a5f58am94553aeb1c2b4c29@mail.gmail.com> In-Reply-To: <4c39e3030702120756w47a5f58am94553aeb1c2b4c29@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - tss8.serverconfig.com X-AntiAbuse: Original Domain - jakarta.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - decoursey.net X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Extend LinkedList and override add to check the size of the map, and if it's too large then removeFirst. nicolas de loof wrote: > This one does not support add(). > > I want my list (collection ?) to be auto-limited, not fixed-sized : > add will > always work, but the latest elements may be lost if list grows over > maxsize. > > > 2007/2/12, Mark A Fortner : >> >> Did you try the FixedSizeList? >> >> Mark >> >> ----- Original Message ---- >> From: nicolas de loof >> To: commons-user@jakarta.apache.org >> Sent: Monday, February 12, 2007 5:11:49 AM >> Subject: [collection] some support for size-limited List ? >> >> Hello, >> >> I'm looking for a List implementation that would countains at most N >> elements. When more that N elements are added, the List is truncated. >> This >> looks like a Last-Recently-Used eviction feature, but I didn't finf >> support >> for such a List in commons-collections. >> >> Any suggestion ? >> >> Nico. >> --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org