package BoxTools; /** * A Link object contains two pointers, one to the element it links, which is * of type T, and one to another Link object. * A Link object must be local, while the element it links can be global. *

Usage: A Link object must be declared local. *

Access level: package. * @see List * @version 1.0 * @author Tong Wen, LBNL * @since 1.0 */ template class Link{ /** the Link object this connects to */ template Link local nextLink; /** the element of type T this connects to */ T element; inline Link(template Link local nextLink, T element){ this.nextLink=nextLink; this.element=element; } inline Link(){ this.nextLink=null; } final inline local void setNextLink(template Link local nextLink){ this.nextLink= nextLink; } final inline local void setElement(T element){ this.element=element; } }