What do I need to consider to determine which design I choose when I have the following scenario?There are two cases to considerer;Given T a generic class, I have to do something with multiple T's (Iterating each one of them).In other cases, with the same T, I have to process just once.In both cases, independent of what is T and how I'll need to process it, the class that comprises T will behave exactly the same way, therefore, I don't need to worry about implementation details.There are 2 possible solutions, and I don't know what directions should I follow to decide between them.Always consider as a List, this is for sake of simplicity, since there are no difference  between a List of T and only T. Use inheritance; the first child class will receive a List of T and work with it, the second, a single T and work with it.Are there some good pratices or some article to help to decide such cases?I'm looking for something like this article, or your experience as well.UPDATE:The class I'm design is not T, but its composer.
How to determine the better design?
design;architecture
If processing every instance of T is independent of processing the others, I'd just create a class that processes one T and then enwrap it with a class that feeds it with a sequence of Ts and just calls the first class in some sort of a foreach block.I wouldn't use inheritance for that.Simplified example (C#):interface IFoo{    void DoStuff();}class FooProcessor<T> where T : IFoo{    public void Process(T item)    {        item.DoStuff();    }}class MultipleFooProcessor<T> where T : IFoo{    // composition over inheritance - MultipleFooProcessor does not share any genes with FooProcessor,     // it just keeps an instance of it in a private field    FooProcessor<T> processor;    // we're passing a regular FooProcessor here.     // thanks to not using inheritance, we could eg. create an IFooProcessor interface    // and pass a different implementation of IFooProcessor here, allowing for a more flexible design.    // see: dependency injection, loose coupling    public MultipleFooProcessor(FooProcessor<T> processor)    {        this.processor = processor;    }    public void Process(IEnumerable<T> sequence)    {        foreach (T item in sequence)        {            Process(item);        }    }    public void Process(T item)    {        processor.Process(item);    }}