diff --git a/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class new file mode 100644 index 0000000..4ac67e7 Binary files /dev/null and b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class differ diff --git a/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class new file mode 100644 index 0000000..784c553 Binary files /dev/null and b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class differ diff --git a/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class new file mode 100644 index 0000000..ee18088 Binary files /dev/null and b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class differ diff --git a/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class index 7ffe38f..be09b8d 100644 Binary files a/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class and b/bin/test/uebung/uebung09/iterator/SkipNullIteratorTest.class differ diff --git a/bin/uebung09/iterator/Array2dIterator.class b/bin/uebung09/iterator/Array2dIterator.class index b957bf4..1226fc4 100644 Binary files a/bin/uebung09/iterator/Array2dIterator.class and b/bin/uebung09/iterator/Array2dIterator.class differ diff --git a/bin/uebung09/iterator/SkipNullIterator.class b/bin/uebung09/iterator/SkipNullIterator.class new file mode 100644 index 0000000..15b794b Binary files /dev/null and b/bin/uebung09/iterator/SkipNullIterator.class differ diff --git a/src/uebung09/iterator/Array2dIterator.java b/src/uebung09/iterator/Array2dIterator.java index 8cb6fa4..7908b24 100644 --- a/src/uebung09/iterator/Array2dIterator.java +++ b/src/uebung09/iterator/Array2dIterator.java @@ -28,12 +28,15 @@ public class Array2dIterator implements Iterator{ // } // return false; - - if (list.get(index+1) != null) { + + if (list.get(index)) { return true; } else { return false; } + + + // return true; } @Override diff --git a/src/uebung09/iterator/SkipNullIterator.java b/src/uebung09/iterator/SkipNullIterator.java new file mode 100644 index 0000000..555ddef --- /dev/null +++ b/src/uebung09/iterator/SkipNullIterator.java @@ -0,0 +1,26 @@ +package uebung09.iterator; + +import java.util.Iterator; +import java.util.List; + +public class SkipNullIterator implements Iterator{ + + public SkipNullIterator(Iterator i){ + + } + + @Override + public boolean hasNext() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'hasNext'"); + } + + @Override + public T next() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'next'"); + } + + + +}