📄 link.java
字号:
package structs;
public class Link {
public Link Next;
public String ClassName(){
return "Link";
}
public void add(Link node) {
Link pos=this;
while(pos.Next!=null){
pos=pos.Next;
}
pos.Next=node;
}
public Link getNext(){
return Next;
}
public void del(Link node){
Link pos=this;
Link pre=this;
while(!pos.equals(node)){
pre=pos;
pos=pos.Next;
if(pos.Next==null)
return;
}
if(node.Next!=null)
pre.Next=node.Next;
else pre.Next=null;
}
public boolean isContent(Link node) {
Link pos=this;
while(!pos.equals(node)){
if(pos.Next==null)
return false;
pos=pos.Next;
}
return true;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -