/** * called when one of this node's children updates it's stop-token, * so that this node can potentially take action; maybe by setting * the same stop-token IF the child was the very-last in this node's * list of children. */ private void notifyChildStopTokenChange(LinkedListTree child, LinkedListToken newStop) { // TODO: maybe move to delegates if (isLast(child) && (isSameStopToken(child) || isNoStopToken(child))) { setStopToken(newStop); } }
public LinkedListToken setStopToken(LinkedListToken stopToken) { if (parent != null) { parent.notifyChildStopTokenChange(this, stopToken); } return this.stopToken = stopToken; }
/** * called when one of this node's children updates it's start-token, * so that this node can potentially take action; maybe by setting * the same start-token IF the child was the very-first in this node's * list of children. */ private void notifyChildStartTokenChange(LinkedListTree child, LinkedListToken newStart) { // TODO: maybe move to delegates if (isFirst(child) && isSameStartToken(child)) { setStartToken(newStart); } }
public void setStartToken(LinkedListToken startToken) { if (parent != null) { parent.notifyChildStartTokenChange(this, startToken); } this.startToken = startToken; }
public void setInitialInsertionBefore(LinkedListToken insert) { initialInsertionBefore = insert; }
public void setInitialInsertionAfter(LinkedListToken insert) { initialInsertionAfter = insert; }
public void appendToken(LinkedListToken append) { tokenListUpdater.AppendToken(this, append); }
public void addToken(int index, LinkedListToken append) { tokenListUpdater.AddToken(this, index, append); }