This is a textbook example for using composition over inheritance. By extending ArrayList, we were adding a bunch of unnecessary methods to this classes contract that is not needed. On top of that, it would be strange, and confusing, if someone was to do List<TickerColumn> columns = new TickerColumnManager().
With this change, we are keeping the contract of this class concise and a lot easier to maintain in the future since we would not have to worry about maintaining the ArrayList contract.
This is a textbook example for using composition over inheritance. By extending
ArrayList
, we were adding a bunch of unnecessary methods to this classes contract that is not needed. On top of that, it would be strange, and confusing, if someone was to doList<TickerColumn> columns = new TickerColumnManager()
.With this change, we are keeping the contract of this class concise and a lot easier to maintain in the future since we would not have to worry about maintaining the
ArrayList
contract.