|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcbr.framework.Case
public class Case
A case consists of indexed and non-indexed features, a solution and the last similarity value that was computed for this case.
Constructor Summary | |
---|---|
Case()
Create an empty case. |
|
Case(Map<String,Feature> allFeatures)
Create a case with features contained in a Map . |
Method Summary | |
---|---|
void |
addFeature(Feature f)
Add a feature to the case . |
int |
compareTo(Case other)
Override the compareTo() method so that Cases can be sorted according to descending similarity. |
double |
getOutcomeValue()
Retrieve the outcome value for this case . |
double |
getSimilarity()
Get the last similarity value that was derived. |
Solution |
getSolution()
Retrieve the solution for this case . |
void |
setOutcomeValue(double value)
Set the Outcome value for this case . |
void |
setSolution(Solution solution)
Set the Solution for this case . |
String |
toString()
Iterate over the features, solution and current similarity and display each of their values. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Case()
public Case(Map<String,Feature> allFeatures)
Map
.
allFeatures
- a Map
which holds Features
with a name key.Method Detail |
---|
public void addFeature(Feature f)
feature
to the case
.
f
- the additional Feature
.public void setSolution(Solution solution)
Solution
for this case
.
solution
- the solutionpublic Solution getSolution()
solution
for this case
.
public void setOutcomeValue(double value)
Outcome
value for this case
.
value
- the outcome valuepublic double getOutcomeValue()
outcome
value for this case
.
public String toString()
toString
in class Object
String
public double getSimilarity()
public int compareTo(Case other)
Cases
can be sorted according to descending similarity.
compareTo
in interface Comparable<Case>
other
- the Case
to compare with.
int
which represents the cases
order in the sort.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |