public void setEvaluationCondition(TimeStep step, Rule rule, Metier metier, boolean evalutionCondition) { this.evalutionCondition.put(step, rule, metier, evalutionCondition); }
public void add(int variable, int[] parents, double score) { Set<Integer> _parents = new HashSet<>(parents.length); for (int parent : parents) { _parents.add(parent); } map.put(variable, _parents, score); }
/** * Get a ConfigMethod implementation appropriate for handling a * configuration interface method. Internally, this uses a cache so * that it can operate very efficiently. * * @param configInterface The configuration interface. * @param method The method. * @return The method implementation. */ @SuppressWarnings("unchecked") public static synchronized ConfigMethod getInstance(Class<?> configInterface, Method method) { ConfigMethod configMethod = (ConfigMethod) configMethods.get(configInterface, method); if (configMethod == null) { configMethod = newInstance(configInterface, method); configMethods.put(configInterface, method, configMethod); } return configMethod; } }
/** * Add blog entries from the planet archive to a multi key map. * * @param mkm Map with blog entries stored with a key consisting of author name and rss feed link. * @param blogEntry Single blog entry retrieved from planet archive. */ protected void createMapEntry(MultiKeyMap<String, List<Node>> mkm, Node blogEntry) { List<Node> blogEntries = new ArrayList<Node>(); try { String author = PlanetUtil.formatName(blogEntry, "author"); String rssLink = PropertyUtil.getString(blogEntry, "rssLink", ""); if (mkm.containsKey(author, rssLink)) { blogEntries = mkm.get(author, rssLink); } if (blogEntry.hasProperty("pubDate")) { blogEntries.add(blogEntry); mkm.put(author, rssLink, blogEntries); } } catch (Exception e) { log.error("Could not add blog entry to statistics list: " + e.getMessage()); } }
public void addLicence(Metier metier, int nbLicences, Month firstMonth, Month lastMonth) { if (!isLimitedPeriode(metier, firstMonth, lastMonth)) { Licence o = new Licence(); o.nbLicences = nbLicences; o.proportionMaxTotal = this.computeProportionMaxTotal(metier, nbLicences); for (Month i=firstMonth; i.compareTo(lastMonth) <= 0; i=i.next()) { o.proportionsMonth.put(i, computeProportionMonth(metier, i)); } this.list.put(metier, firstMonth, lastMonth, o); } else{ log.warn("il existe deja une licence touchant le metier: " + metier + " sur la periode:"+ firstMonth + "-" + lastMonth); } }