}
@Override
public Iterator<Move> track(Instance instance) {
if (instance instanceof ObjectArrayInstance) {
ObjectArrayInstance array = (ObjectArrayInstance) instance;
if (index < 0) {
List<Move> result = new ArrayList<Move>();
int n = 0;
for(Instance i: array.getValues()) {
result.add(new Move("[" + n + "]", i));
++n;
}
return result.iterator();
}
else {
if (array.getLength() > index) {
return Collections.singleton(new Move("[" + index + "]", array.getValues().get(index))).iterator();
}
else {
return Collections.<Move>emptyList().iterator();
}
}