Can we use a Class with encapsulation to do the work of an interface module?

More or the less interface has similar functionality like having all the signals at one place, but I am not sure about whether instead of it we can use a class with encapsulation.

In reply to pghosh:

See these two DVCon papers

https://www.doulos.com/downloads/events/DVCon_08_abstractBFM_final.pdf
https://verificationacademy.com/forums/downloads/updated-example-code-dvcon-paper-missing-link-testbench-dut-connection