*
* The MIT License (MIT)
*
- * Copyright (C) 2016 Kevin Lamonte
+ * Copyright (C) 2017 Kevin Lamonte
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
*/
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);
}
}