當前位置: 首頁>>代碼示例>>Java>>正文


Java ResultCode類代碼示例

本文整理匯總了Java中edacc.model.ResultCode的典型用法代碼示例。如果您正苦於以下問題:Java ResultCode類的具體用法?Java ResultCode怎麽用?Java ResultCode使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ResultCode類屬於edacc.model包,在下文中一共展示了ResultCode類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: jobReset

import edacc.model.ResultCode; //導入依賴的package包/類
protected void jobReset(ExperimentResult er) {
	if (er.getStatus().equals(StatusCode.RUNNING)) {
		numRunningJobs--;
	}
	if (!er.getStatus().equals(StatusCode.NOT_STARTED) && !er.getStatus().equals(StatusCode.RUNNING)) {
		numFinishedJobs--;
	}
	if (String.valueOf(er.getResultCode().getResultCode()).startsWith("1")) {
		numSuccessfulJobs--;
	}
	if (!er.getStatus().equals(StatusCode.NOT_STARTED)) {
		numNotStartedJobs++;
	}
	er.setStatus(StatusCode.NOT_STARTED);
	er.setResultCode(ResultCode.UNKNOWN);
}
 
開發者ID:EDACC,項目名稱:edacc_aac,代碼行數:17,代碼來源:SolverConfiguration.java

示例2: testSaveNewCode

import edacc.model.ResultCode; //導入依賴的package包/類
/**
 * Test of saveNewCode method, of class ManageDBResultCodes.
 */
@Test
public void testSaveNewCode() throws Exception {
    System.out.println("saveNewCode");
    int code = 42;
    String description = "The Answer to the Ultimate Question of Life, the Universe, and Everything";
    ManageDBResultCodes writeInstance = ManageDBResultCodes.getInstance();
    
    writeInstance.saveNewCode(code, description);
    
    LinkedList<ResultCode> all = ResultCodeDAO.getAll();
    assertTrue(all.contains(new ResultCode(code, description)));
    
    LinkedList<ResultCode> remove = new LinkedList<ResultCode>();
    remove.add(ResultCodeDAO.getByResultCode(code));
    ResultCodeDAO.remove(remove);
    
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:21,代碼來源:ManageDBResultCodesTest.java

示例3: getResultCode

import edacc.model.ResultCode; //導入依賴的package包/類
@Override
public ResultCode getResultCode() {
	if (status.equals(StatusCode.NOT_STARTED) || status.equals(StatusCode.RUNNING)) {
		return ResultCode.UNKNOWN;
	} else {
		return er.getResultCode();
	}
}
 
開發者ID:EDACC,項目名稱:edacc_aac,代碼行數:9,代碼來源:APISimulation.java

示例4: saveNewCode

import edacc.model.ResultCode; //導入依賴的package包/類
public void saveNewCode(int code, String description) throws SQLException {
    if (description.length() > 255)
        throw new IllegalArgumentException("Description too long! Maximal length: 255 characters.");
    ResultCode rc = new ResultCode(code, description);
    ResultCodeDAO.save(rc);
    ResultCodeTableModel.getInstance().add(rc);
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:8,代碼來源:ManageDBResultCodes.java

示例5: remove

import edacc.model.ResultCode; //導入依賴的package包/類
public void remove(int[] sel) throws SQLException {
    LinkedList<ResultCode> codes = new LinkedList<ResultCode>();
    for (int i : sel) {
        codes.add(ResultCodeTableModel.getInstance().getResultCode(i));
    }
    ResultCodeTableModel.getInstance().removeAll(codes);
    ResultCodeDAO.remove(codes);
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:9,代碼來源:ManageDBResultCodes.java

示例6: ResultCodeTableModel

import edacc.model.ResultCode; //導入依賴的package包/類
private ResultCodeTableModel() {
    resultCodes = new ArrayList<ResultCode>();
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:4,代碼來源:ResultCodeTableModel.java

示例7: addList

import edacc.model.ResultCode; //導入依賴的package包/類
public void addList(Collection<ResultCode> add) {
    resultCodes.addAll(add);
    fireTableDataChanged();
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:5,代碼來源:ResultCodeTableModel.java

示例8: getResultCode

import edacc.model.ResultCode; //導入依賴的package包/類
public ResultCode getResultCode(int i) {
    return resultCodes.get(i);
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:4,代碼來源:ResultCodeTableModel.java

示例9: removeAll

import edacc.model.ResultCode; //導入依賴的package包/類
void removeAll(Collection<ResultCode> rcs) {
    resultCodes.removeAll(rcs);
    fireTableDataChanged();
}
 
開發者ID:EDACC,項目名稱:edacc_gui,代碼行數:5,代碼來源:ResultCodeTableModel.java

示例10: updateCPUTimeLimit

import edacc.model.ResultCode; //導入依賴的package包/類
/**
 * Updates the CPU time limit, the status and the result code of the given
 * job
 * 
 * @param idJob ID of the job.
 * @param cputimelimit the new CPU time limit.
 * @param statusCode the new status code.
 * @param resultCode the new result code.
 * @return
 * @throws Exception
 */
public ExperimentResult updateCPUTimeLimit(int idJob, int cputimelimit, StatusCode statusCode, ResultCode resultCode) throws Exception;
 
開發者ID:EDACC,項目名稱:edacc_api,代碼行數:13,代碼來源:API.java


注:本文中的edacc.model.ResultCode類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。