uebung08
This commit is contained in:
29
uebung08/src/doc/Image.java
Normal file
29
uebung08/src/doc/Image.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package 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 getUrl(){
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getCaption(){
|
||||
return caption;
|
||||
}
|
||||
|
||||
public <T> T accept(Visitor<T> v){
|
||||
return v.visit(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user