*/
public void insert(final int idx, final Cell newCell) {
System.arraycopy(chars, idx, chars, idx + 1, chars.length - idx - 1);
- chars[idx] = newCell;
+ chars[idx] = new Cell();
+ chars[idx].setTo(newCell);
}
/**
*/
public void delete(final int idx, final Cell newCell) {
System.arraycopy(chars, idx + 1, chars, idx, chars.length - idx - 1);
- chars[chars.length - 1] = newCell;
+ chars[chars.length - 1] = new Cell();
+ chars[chars.length - 1].setTo(newCell);
}
}