@Override public String view() { StringBuilder sb = new StringBuilder(); for (TTFChar c : this.model) { if (c.isVisible()) { sb.append(c.getChar()); } } return sb.toString(); }
@Override public void applyLocal(Operation op) { TTFOperation oop = (TTFOperation) op; int pos = oop.getPosition(); if (oop.getType() == TraceOperation.OpType.del) { TTFChar c = this.model.get(pos); c.hide(); } else { this.model.add(pos, new TTFChar(oop.getChar())); } }