commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <>
Subject [jira] [Commented] (COLLECTIONS-366) A light-weighted list of integers
Date Sun, 03 Mar 2013 19:13:12 GMT


Thomas Neidhart commented on COLLECTIONS-366:

Well, the loop example is maybe not the most convincing one.

The Range class in commons-lang does not allow to use it with a collection API, this is the
main use I see for this feature.
You can convert a Range to an array, but this means you have to create all elements in advance,
which may be large in some cases.

Actually it is very similar to a LazyList decorator, with the different that is has a fixed
size (a LazyList decorator allows the underlying list to grow), and does not store the created
elements, but only creates and returns them when needed.

If people argue that this is quite a useless feature, I am fine with removing it again, so
please comment.
> A light-weighted list of integers
> ---------------------------------
>                 Key: COLLECTIONS-366
>                 URL:
>             Project: Commons Collections
>          Issue Type: New Feature
>    Affects Versions: 3.2
>            Reporter: Dmitry Katsubo
>         Attachments:
> Sometimes there is a demand too have a list, that represents numbers within some range
(say, [5..10]). If the range is big (millions of records), creating a dummy list that holds
all instances of objects is too expensive.
> The provided implementation (attached to this issue) solves this problem. Nice to have
in commons collections.

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:

View raw message