This package includes interfaces which make up the minimal decomposition of the concept of a list, which are frequently more powerful and less clunky in isolation.
java.util.List rolls together a bunch of heterogenous
abstractions which are more powerful when separated:
IntAddressable —
the ability to provide an
object for a given indexIntResolvable —
the ability to get the index of
an objectIntSized —
thing that has a size that can be
represented as an integerIndexed —
thing with an integer size which has
the ability to provide an object for a given indexIndexedResolvable —
thing with an integer size which has
the ability to provide an object for a given index and can also
map objects to their indices.
Frequently one needs to implement an algorithm which needs some, but
not all, of these abstractions, and that algorithm will be more flexible
if it does not need anything it is applied to to already be in
a List or be copied into one. For example, binary search
requires a size and the ability to fetch items from a list, but does
not need any other methods of List, and may be applied
to data structures so large that copying them into a list is prohibitive -
yet both implementations of binary search in the JDK require an array
or a List. So unpacking these abstractions and providing
simple ways to wrap collections in them allows implementations of things
that operate on them to be far more powerful.
Similar classes are provided for long-indexed data, which can be used over files or large data stores.