diff --git a/bin/uebung08/doc/CountWordsVisitor.class b/bin/uebung08/doc/CountWordsVisitor.class new file mode 100644 index 0000000..858c0bd Binary files /dev/null and b/bin/uebung08/doc/CountWordsVisitor.class differ diff --git a/bin/uebung08/doc/Image.class b/bin/uebung08/doc/Image.class index 47f595c..07ae1c0 100644 Binary files a/bin/uebung08/doc/Image.class and b/bin/uebung08/doc/Image.class differ diff --git a/bin/uebung08/doc/Visitor.class b/bin/uebung08/doc/Visitor.class new file mode 100644 index 0000000..106cc33 Binary files /dev/null and b/bin/uebung08/doc/Visitor.class differ diff --git a/src/uebung08/doc/CountWordsVisitor.java b/src/uebung08/doc/CountWordsVisitor.java new file mode 100644 index 0000000..18e7472 --- /dev/null +++ b/src/uebung08/doc/CountWordsVisitor.java @@ -0,0 +1,11 @@ +package uebung08.doc; + +public class CountWordsVisitor implements Visitor{ + + + @Override + public Integer visit(TextComponent textComponent) { + image.accept(this); + return 0; + } +} diff --git a/src/uebung08/doc/Visitor.java b/src/uebung08/doc/Visitor.java new file mode 100644 index 0000000..80e6282 --- /dev/null +++ b/src/uebung08/doc/Visitor.java @@ -0,0 +1,5 @@ +package uebung08.doc; + +public interface Visitor { + T visit(TextComponent textComponent); +}