You can use anonymous class it'll get rid of creating interface and creating class
But wouldn't that make client code as tightly coupled to implementation of sendFiles() as using an array?
Sometimes minimum abstraction is enough but if you want to expand your logic of course it's better use an interfaced approach.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.