|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CaseLibrary
The class `CaseLibrary' represents a case library. It encapsulates an organisation of cases within the library, allowing new cases to be added and existing cases to be retrieved.
Constructor Summary | |
CaseLibrary()
|
Method Summary | |
void |
insert(Case newCase)
Adds a new case in the case library. |
static void |
load(java.lang.String filename)
Loads the case library from a binary file. |
void |
print()
Prints the contents of the case library, in the form of a list of cases (frame reference and filename for each case) for each frame class in the library's index. |
java.util.Vector |
retrieve(Frame prompt)
Retrieves those cases from the case library that are indexed by the frame class of the prompt frame, without full matching. |
Case |
retrieveOneMatchingCase(Frame prompt)
Retrieves one case from the case library that fully matches the prompt frame. |
static void |
save(java.lang.String filename)
Saves the case library to a binary file. |
static Case |
selectMostSpecific(java.util.Vector cases)
Given a set of cases, select the one which is the most specific - i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CaseLibrary()
Method Detail |
public java.util.Vector retrieve(Frame prompt)
prompt
- A frame to use as a retrieval prompt.public Case retrieveOneMatchingCase(Frame prompt)
prompt
- A frame to use as a retrieval prompt.public static Case selectMostSpecific(java.util.Vector cases)
cases
- A non-empty set of cases.public void insert(Case newCase)
case
- The new case to store in the case library.public static void load(java.lang.String filename) throws java.io.FileNotFoundException
filename
- The filename of the case library binary.java.io.FileNotFoundException
- If the file is not found.public static void save(java.lang.String filename)
filename
- The filename of the case library binary.public void print()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |