?? aidlist.java
字號:
/* This file was generated by SableCC (http://www.sablecc.org/). */package org.sablecc.sablecc.node;import java.util.*;import org.sablecc.sablecc.analysis.*;public final class AIdList extends PIdList{ private TId _id_; private final LinkedList _ids_ = new TypedLinkedList(new Ids_Cast()); public AIdList() {} public AIdList( TId _id_, List _ids_) { setId(_id_); { this._ids_.clear(); this._ids_.addAll(_ids_); } } public AIdList( TId _id_, XPIdListTail _ids_) { setId(_id_); if(_ids_ != null) { while(_ids_ instanceof X1PIdListTail) { this._ids_.addFirst(((X1PIdListTail) _ids_).getPIdListTail()); _ids_ = ((X1PIdListTail) _ids_).getXPIdListTail(); } this._ids_.addFirst(((X2PIdListTail) _ids_).getPIdListTail()); } } public Object clone() { return new AIdList( (TId) cloneNode(_id_), cloneList(_ids_)); } public void apply(Switch sw) { ((Analysis) sw).caseAIdList(this); } public TId getId() { return _id_; } public void setId(TId node) { if(_id_ != null) { _id_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } _id_ = node; } public LinkedList getIds() { return _ids_; } public void setIds(List list) { _ids_.clear(); _ids_.addAll(list); } public String toString() { return "" + toString(_id_) + toString(_ids_); } void removeChild(Node child) { if(_id_ == child) { _id_ = null; return; } if(_ids_.remove(child)) { return; } } void replaceChild(Node oldChild, Node newChild) { if(_id_ == oldChild) { setId((TId) newChild); return; } for(ListIterator i = _ids_.listIterator(); i.hasNext();) { if(i.next() == oldChild) { if(newChild != null) { i.set(newChild); oldChild.parent(null); return; } i.remove(); oldChild.parent(null); return; } } } private class Ids_Cast implements Cast { public Object cast(Object o) { PIdListTail node = (PIdListTail) o; if((node.parent() != null) && (node.parent() != AIdList.this)) { node.parent().removeChild(node); } if((node.parent() == null) || (node.parent() != AIdList.this)) { node.parent(AIdList.this); } return node; } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -