How to access Abstract Class fields from a Class that doesn't extend it?

The push() method works, I had another decorator with capacity that uses super.push() and works just fine. The problem here is the elements variable I can’t access. A workaround I did is putting the compare() in all 3 concrete components, but that’s just dumb.

I basically need to implement everything from last thread but convert them to decorator pattern.