001/**
002 * StoreCasesMethod.java
003 * jCOLIBRI2 framework. 
004 * @author Juan A. Recio-Garc�a.
005 * GAIA - Group for Artificial Intelligence Applications
006 * http://gaia.fdi.ucm.es
007 * 05/01/2007
008 */
009package es.ucm.fdi.gaia.jcolibri.method.retain;
010
011import java.util.ArrayList;
012import java.util.List;
013
014import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRCase;
015import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRCaseBase;
016
017/**
018 * Stores cases in the case base.
019 * @author Juan A. Recio-Garcia
020 *
021 */
022public class StoreCasesMethod {
023
024        
025        /**
026         * Simple method that adds some cases to the case base invoking caseBase->learnCases().
027         */
028        public static void storeCases(CBRCaseBase caseBase, List<CBRCase> cases)
029        {
030                caseBase.learnCases(cases);
031        }
032        
033        /**
034         * Simple method that add a case to the case base invoking caseBase->learnCases().
035         */
036        public static void storeCase(CBRCaseBase caseBase, CBRCase _case)
037        {
038                List<CBRCase> cases = new ArrayList<CBRCase>();
039                cases.add(_case);
040                caseBase.learnCases(cases);
041        }
042
043}