📄 lockcomposer.java
字号:
/*
* lockComposer.java
*
* Created on 27 July 2006, 21:50
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package uk.ac.kent.dpa.util;
/**
*
* @author ls97
*/
public class LockComposer {
private String dbURL;
private String[] attributes;
private int[] types;
private static int READ = 0;
private static int WRITE = 1;
/** Creates a new instance of lockComposer */
public LockComposer(String dbURLIn,String[] attrsIn, int[] typesIn) {
this.dbURL=dbURLIn;
this.attributes=attrsIn;
this.types=typesIn;
}
public String getDbURL() {
return this.dbURL;
}
public String compose() {
String res = new String();
String t;
for (int i=0; i<this.attributes.length; i++) {
if (this.types[i]==0) t = new String("READ");
else t = new String("WRITE");
if (i<this.attributes.length-1) res += this.attributes[i]+" "+t+",";
else res += this.attributes[i]+" "+t;
}
return res;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -