I see a lot of APIs that use custom collections instead of just using strongly-typed packaged generics.
For instance, the API will have a
Object1Collection instead of just a
List<Object1> (or whatever the appropriate generic would be).
When do you know to use one or the other? I understand you'd create a custom collection if you want to extend the capabilities of a pre-shipped generic collection, but what if that's not the case?
Is it prudent to create the custom collection from the beginning, with thoughts that in the future that object might scale up and require further capabilities, and it may be easier to just do that initially? Is that justification enough?
And if you just want to extend functionality, instead of define collection functionality, you would just derive your custom collection from a base generic collection class, otherwise inherit the interface accordingly? Is that typical?