I agree with @DarthVader, although it is better to write in Java
public class XDocument implements IDocument { ...
You can also use an abstract class if you have a lot in common with documents, and abstract save()
, which is implemented only in subclasses, is called in the general methods of the base class.
emesx source share