Browse Source

Anpassung der AbstractSimpleList-Klasse

vollständige_und_weitere_testate
hertero 3 years ago
committed by chris
parent
commit
74a5ee2946
  1. 42
      SimpleLinkedList/src/solution/AbstractSimpleList.java

42
SimpleLinkedList/src/solution/AbstractSimpleList.java

@ -2,42 +2,24 @@ package solution;
import java.util.Collection;
public class AbstractSimpleList<E> implements ISimpleList<E>{
public abstract class AbstractSimpleList<E> implements ISimpleList<E> {
@Override
public int size() {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean add(E e) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean add(Collection c) {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean contains(Object o) {
// TODO Auto-generated method stub
return false;
}
public boolean add(Collection<E> c) {
boolean temp = true;
for (E e : c) {
temp = temp && add(e);
}
@Override
public boolean remove(Object o) {
// TODO Auto-generated method stub
return false;
return temp;
}
@Override
public void forAll(ICommand<E> command) {
// TODO Auto-generated method stub
if (command != null) {
for (int i = 0; i < size(); i++) {
command.execute(get(i));
}
}
}
}

Loading…
Cancel
Save