?? keyedemployee.java
字號:
package fileMerging;
import dslib.base.KeyedUos;
import sequentialProcessing.Employee;
/** An Employee with a key, the employee number. */
public class KeyedEmployee extends Employee implements KeyedUos
{
/** Construct a new employee.
Analysis: Time = O(1) */
public KeyedEmployee(String newName, int newNumber, float newRate, String newClassification)
{
super(newName, newNumber, newRate, newClassification);
}
/** Key of the employee.
Analysis: Time = O(1) */
public Comparable key()
{
return new Integer(number);
}
/** Set the key to be newKey.
Analysis: Time = O(1)
@param newKey the new key value for the current employee */
public void setKey(Comparable newKey)
{
number = ((Integer)newKey).intValue();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -