private List<DataEntry> getMatchesFromYear(String country, String division, int year) { List<DataEntry> retval = new LinkedList<DataEntry>(); List<DataEntry> tmp = Model.dataset.get(this.getDataKey(country, division)); for (DataEntry tse : tmp) { if (year == Integer.valueOf((String) tse.getExtra("season_start_year"))) retval.add(tse.clone()); } return retval; }
private List<DataEntry> getTrainingSet(String country, String division, int maxyear) { List<DataEntry> retval = new LinkedList<DataEntry>(); List<DataEntry> clone = dataset.get(this.getDataKey(country, division)); for (DataEntry tse : clone) { if (maxyear >= Integer.valueOf((String) tse.getExtra("season_start_year"))) retval.add(tse.clone()); } return retval; }