📄 operation.java
字号:
//说明:实现接口。
public class Operation implements EditorOperation{
int count;
String param1;
String param2;
boolean control=false;
public Operation(){
}
public void getCommand(String s[]){
}
public int getParamcount(int i){
this.count=i;
return count;
}
public String execute(){
return "";
}
public static void main(String argv[]) throws mainexception{
if(argv.length==0){ //judgement of exception
throw new mainexception();
}else if(argv.length==1){
throw new mainexception(argv[0]);
}//end if;
String get=argv[1];
if(get.equalsIgnoreCase("i")){
InsertOperation o=new InsertOperation();
o.getCommand(argv);
System.out.println(o.execute());
}else if(get.equalsIgnoreCase("tl")){
LowerOperation tl=new LowerOperation();
tl.getCommand(argv);
System.out.println(tl.execute());
}else if(get.equalsIgnoreCase("rev")){
ReverseOperation rev=new ReverseOperation();
rev.getCommand(argv);
System.out.println(rev.execute());
}else if(get.equalsIgnoreCase("r")){
RemoveOperation r=new RemoveOperation();
r.getCommand(argv);
System.out.println(r.execute());
}else if(get.equalsIgnoreCase("sub")){
SubOperation sub=new SubOperation();
sub.getCommand(argv);
System.out.println(sub.execute());
}else if(get.equalsIgnoreCase("tu")){
UpperOperation tu=new UpperOperation();
tu.getCommand(argv);
System.out.println(tu.execute());
}else if(get.equalsIgnoreCase("s")){
SubstOperation s=new SubstOperation();
s.getCommand(argv);
System.out.println(s.execute());
}else{
System.out.println("请插入有效的操作命令!");
}
}//end main();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -