|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcbr.framework.CaseBase
public class CaseBase
CAMUS: Case Assembly, Maintenance & Usage System
Bugs, improvements, concerns can be reported to jrub001@aucklanduni.ac.nz
The CaseBase
class holds a collection of Cases
in a list structure. It provides methods
to acquire, maintain and retrieve cases in the case base.
Field Summary | |
---|---|
static int |
NUMBER_DETAILS
The number of attributes each feature must specify in flat file format. |
Constructor Summary | |
---|---|
CaseBase()
Creates an empty case base |
|
CaseBase(String fileName)
Creates a case base described in flat file format. |
Method Summary | |
---|---|
void |
assembleCaseBase(String fileName)
Given a case base represented as a flat file, this method will load the cases into working memory. |
List<Case> |
getAllCases()
Provides a reference to the case-base. |
void |
printAllCases()
Prints all the cases in the current case-base to standard output. |
void |
retain(Case targetCase,
String fileName)
Retain the target case by adding its features and solution to the flat file used to represent the case-base. |
void |
retainWithReplacement(Case existingCase,
String fileName)
Retains an existing case in the case base to reflect changes made to the outcome of the case. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NUMBER_DETAILS
Constructor Detail |
---|
public CaseBase()
public CaseBase(String fileName)
fileName
- the name of the file that holds the casesMethod Detail |
---|
public void assembleCaseBase(String fileName)
fileName
- the name of the file that holds the casespublic void retain(Case targetCase, String fileName)
targetCase
- the case to be retainedfileName
- the file to retain the persisted casepublic void retainWithReplacement(Case existingCase, String fileName)
existingCase
- the case whose outcome has been modifiedfileName
- the file to retain the persisted casepublic List<Case> getAllCases()
public void printAllCases()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |