📄 tableentry.java
字号:
/* * TableEntry.java * * Created on August 14, 2001, 7:33 AM * * See LICENSE file for license conditions. */package residue.tables;import java.util.*;/** * This class represents an individual entry in the Table. * * @author chowells * @version */public class TableEntry implements Comparable{ private int index; private int ref; private String classname; private String methodname; private int startpos; private int probepos; private int endpos; private String sourcename; private Set lines; private boolean executed; private boolean isref; /** * Package level constructor for use in the parser. */ TableEntry(Integer index, Integer ref, String classname, String methodname, Integer startpos, Integer probepos, Integer endpos, String sourcename, Set lines) { this.index = index.intValue(); this.ref = ref.intValue(); this.classname = classname; this.methodname = methodname; this.startpos = startpos.intValue(); this.probepos = probepos.intValue(); this.endpos = endpos.intValue(); this.sourcename = sourcename; this.lines = Collections.unmodifiableSet(new TreeSet(lines)); isref = false; } // TableEntry /** * Second package level constructor for use in the parser. */ TableEntry(Integer index, Integer ref, String classname, String methodname, Integer startpos, Integer endpos, String sourcename, Set lines) { this.index = index.intValue(); this.ref = ref.intValue(); this.classname = classname; this.methodname = methodname; this.startpos = startpos.intValue(); this.probepos = -1; this.endpos = endpos.intValue(); this.sourcename = sourcename; this.lines = Collections.unmodifiableSet(new TreeSet(lines)); isref = true; } // TableEntry /** * Package level mutator, used in the constructor for Table. */ void setExecuted() { executed = true; } // setHit public int getIndex() { return index; } // getIndex public int getRef() { return ref; } // getRef public String getClassName() { return classname; } // getClassName public String getMethodName() { return methodname; } // getMethodName public int getStartPosition() { return startpos; } // getStartPosition public int getProbePosition() { return probepos; } // getProbePosition public int getEndPosition() { return endpos; } // getEndPosition public String getSourceName() { return sourcename; } // getSourceName public boolean wasExecuted() { return executed; } // wasExecuted public boolean isRef() { return isref; } // isref /** * This returns a read-only set. */ public Set getLineSet() { return lines; } // getLineSet /** * Method used when sorting the TableEntries. */ public int compareTo(Object obj) { TableEntry other = (TableEntry)obj; return index - other.index; } // compareTo } // class TableEntry
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -