You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2013/04/22 22:55:15 UTC

[jira] [Commented] (COLLECTIONS-399) Add indexed get to CircularFifoQueue

    [ https://issues.apache.org/jira/browse/COLLECTIONS-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13638420#comment-13638420 ] 

Thomas Neidhart commented on COLLECTIONS-399:
---------------------------------------------

Updated title to reflect that actually the CircularFifoQueue has been updated due to the changes applied for COLLECTIONS-432.
                
> Add indexed get to CircularFifoQueue
> ------------------------------------
>
>                 Key: COLLECTIONS-399
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-399
>             Project: Commons Collections
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: 4.0
>
>
> Since the BoundedFifoBuffer is implemented as an array, it should be simple to implement random access to any element of the buffer.
> [This functionality was requested on the Commons user list]
> For example:
> // get nth entry; i.e. get(0) is the same as get()
> // NoSuchElementException if i >= numEntries
> // if i < 0, could either throw an Exception or treat as reverse index from end of buffer
> E get(int i)
> This would also work for the sub-class CircularFifoBuffer.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira