package uebung08.doc;

public class Image implements TextComponent {

    private String url;
    private String caption;

    public Image(String url, String caption) {
        this.url = url;
        this.caption = caption;
    }

    public int countWords() {
        return 0;
    }

    public String getCaption() {
        return caption;
    }

    // immer diese accept methode verwenden
    @Override
    public <T> T accept(Visitor<T> visitor) { return visitor.visit(this); }

}
