I'm trying to make my own collection based off the ArrayList class and I got a question.

If someone references a specific item in my ArrayList class, I want to do something to the Object. In C++ I'd probably overload the [] operator, modify the object and then return it(like what would normally hapen).