StructureSet does never remove the element at index 0:
public boolean remove(Object o) {
int idx = indexOf(o);
if (idx != -1) {
if (--count > 0) {
elements[idx] = elements[count];
elements[count] = null;
}
return true;
}
return false;
}
Can be fixed by moving the null assign outside of the if-block or by changing the > to >=.
StructureSet does never remove the element at index 0:
Can be fixed by moving the null assign outside of the if-block or by changing the > to >=.