void register(Keyword keyword, NamedLogic logic, boolean force) { Class<? extends NamedLogic> type = logic.type(); Map<Keyword, NamedLogic> lookup = registry.get(type); if (null == lookup) { lookup = new HashMap<>(); registry.put(type, lookup); } NamedLogic existing = lookup.put(keyword, logic); E.unexpectedIf(!force && null != existing && logic != existing, "Keyword already used: " + keyword.hyphenated()); }
public Map<String, Scenario> load() { loadDefault(); searchScenarioFolder(); Map<String, Scenario> scenarioMap = new LinkedHashMap<>(); for (Map.Entry<Keyword, Scenario> entry : store.entrySet()) { scenarioMap.put(entry.getKey().hyphenated(), entry.getValue()); } return scenarioMap; }
public Map<String, Scenario> load() { loadDefault(); searchScenarioFolder(); Map<String, Scenario> scenarioMap = new HashMap<>(); for (Map.Entry<Keyword, Scenario> entry : store.entrySet()) { scenarioMap.put(entry.getKey().hyphenated(), entry.getValue()); } return scenarioMap; }
public Map<String, Scenario> load() { loadDefault(); searchScenarioFolder(); Map<String, Scenario> scenarioMap = new LinkedHashMap<>(); for (Map.Entry<Keyword, Scenario> entry : store.entrySet()) { scenarioMap.put(entry.getKey().hyphenated(), entry.getValue()); } return scenarioMap; }
void register(Keyword keyword, NamedLogic logic, boolean force) { Class<? extends NamedLogic> type = logic.type(); Map<Keyword, NamedLogic> lookup = registry.get(type); if (null == lookup) { lookup = new HashMap<>(); registry.put(type, lookup); } NamedLogic existing = lookup.put(keyword, logic); E.unexpectedIf(!force && null != existing && logic != existing, "Keyword already used: " + keyword.hyphenated()); }
private void register(Keyword keyword) { Class<? extends NamedLogic> type = type(); Map<Keyword, NamedLogic> lookup = registry.get(type); if (null == lookup) { lookup = new HashMap<>(); registry.put(type, lookup); } NamedLogic existing = lookup.put(keyword, this); E.unexpectedIf(null != existing, "Keyword already used: " + keyword.hyphenated()); }
@Override public String toString() { if (null == initVal) { return keyword().hyphenated(); } return S.concat(keyword().hyphenated(), ": ", initVal); }
@Override public String toString() { if (null == initVal) { return keyword().hyphenated(); } return S.concat(keyword().hyphenated(), ": ", initVal); }
@Override public String toString() { if (null == initVal) { return keyword().hyphenated(); } return S.concat(keyword().hyphenated(), ": ", initVal); }
hasKeywordMatchingChild = true; staticChildren.put(keyword.javaVariable(), node); staticChildren.put(keyword.hyphenated(), node); staticChildren.put(keyword.underscore(), node); return node;
hasKeywordMatchingChild = true; staticChildren.put(keyword.javaVariable(), node); staticChildren.put(keyword.hyphenated(), node); staticChildren.put(keyword.underscore(), node); return node;