30 | | This mechanism is especially useful when large lists are used, or when you already know that the user of the list will only pick a few items from the list, or even just wants to know the size of the list. Therefore ImmutableList uses BigInteger for indexing. |
| 30 | ImmutableList uses BigInteger for indexing to support unlimited list sizes. |
| 31 | |
| 32 | This mechanism is especially useful when the list elements have to be generated on an as-needed basis. For example when large lists are used, when the list elements are expensive to create, or when you already know that the user of the list will only pick a few items from the list, or even just wants to know the size of the list. |