So let's say I have an Opener class or interface (doesn't matter), which has a method public open(Openable<T> item). A Bag, Window, Door implements Openable interface, because all of them can be opened.
Question: how should I name method in Openable interface? If I name it void open() then this will imply that all objects which are Openable can open, which is not true, only Opener can open Openable objects.
Aucun commentaire:
Enregistrer un commentaire