Begin gemaakt aan de ApplicationSelector. Om een of andere reden werkt de ChangeListener niet. Ik ben ook nog niet tevreden over de naamgeving en de twee oerlelijke arrays.

This commit is contained in:
Bram Veenboer
2011-05-10 18:51:21 +00:00
parent dab8e9494b
commit bf6af992e3
5 changed files with 133 additions and 20 deletions

View File

@@ -6,14 +6,31 @@ public class ArrayCycle<E> extends ArrayList<E> {
protected static final long serialVersionUID = 1L;
protected int index = 0;
//protected Object nonEmpty;
public ArrayCycle(E... elementArary) {
//nonEmpty = new Object();
for (E element : elementArary) {
add(element);
}
}
/*public boolean add(E element) {
boolean result = super.add(element);
synchronized (nonEmpty) {
nonEmpty.notifyAll();
}
return result;
}*/
public E current() {
/*while (index == 0) {
synchronized (nonEmpty) {
try {
nonEmpty.wait();
} catch (InterruptedException e) {}
}
}*/
return this.get(index);
}