ich komm nicht mehr weiter
This commit is contained in:
parent
7972c9088c
commit
55e6561e02
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$1.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$2.class
Normal file
Binary file not shown.
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class
Normal file
BIN
bin/test/uebung/uebung09/iterator/SkipNullIteratorTest$3.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/uebung09/iterator/SkipNullIterator.class
Normal file
BIN
bin/uebung09/iterator/SkipNullIterator.class
Normal file
Binary file not shown.
@ -29,11 +29,14 @@ public class Array2dIterator<T> implements Iterator<T>{
|
|||||||
// return false;
|
// return false;
|
||||||
|
|
||||||
|
|
||||||
if (list.get(index+1) != null) {
|
if (list.get(index)) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
26
src/uebung09/iterator/SkipNullIterator.java
Normal file
26
src/uebung09/iterator/SkipNullIterator.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package uebung09.iterator;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class SkipNullIterator<T> implements Iterator<T>{
|
||||||
|
|
||||||
|
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'");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user