jcolibri.method.maintenance
Class CaseResult

java.lang.Object
  extended by jcolibri.method.maintenance.QueryResult
      extended by jcolibri.method.maintenance.CaseResult
All Implemented Interfaces:
java.lang.Comparable

public class CaseResult
extends QueryResult
implements java.lang.Comparable

Stores the case result information. It contains a pair. The result is some double value related to the case.

Author:
Lisa Cummins

Field Summary
 
Fields inherited from class jcolibri.method.maintenance.QueryResult
_case, result
 
Constructor Summary
CaseResult(CBRCase _case, double result)
          Sets up a pair.
 
Method Summary
 CBRCase getCase()
          Returns the case.
static java.util.List sortResults(boolean ascending, java.util.List<CaseResult> toSort)
          Sorts the given list of CaseResults in the given order and returns the sorted list.
 
Methods inherited from class jcolibri.method.maintenance.QueryResult
compareTo, getResult, setCase, setEval, sortResults, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CaseResult

public CaseResult(CBRCase _case,
                  double result)
Sets up a pair.

Parameters:
_case - The case to be stored
result - The result associated with this case.
Method Detail

getCase

public CBRCase getCase()
Returns the case.

Overrides:
getCase in class QueryResult
Returns:
the case.

sortResults

public static java.util.List sortResults(boolean ascending,
                                         java.util.List<CaseResult> toSort)
Sorts the given list of CaseResults in the given order and returns the sorted list.

Parameters:
ascending - The order in which to sort the elements.
toSort - The list of CaseResults to sort.
Returns:
the sorted list.

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es