/** * Returns a {@link Set} view of the mappings contained in this map. * The set is backed by the map, so changes to the map should be * reflected in the set, and vice-versa. However, the implementation * does not reflect changes currently. * * @return an entry set of a map */ @Override public Set<Entry<String, Object>> entrySet() { return getMap().entrySet(); }
/** * Returns a {@link Set} view of the mappings contained in this map. * The set is backed by the map, so changes to the map should be * reflected in the set, and vice-versa. However, the implementation * does not reflect changes currently. * * @return an entry set of a map */ @Override public Set<Entry<String, Object>> entrySet() { return getMap().entrySet(); }
/** * Returns a {@link Collection} view of the values contained in this map. * The collection is backed by the map, so changes to the map should be * reflected in the collection, and vice-versa. However, the implementation * does not reflect changes currently. * * @return a collection view of the values contained in this map */ @Override public Collection<Object> values() { return getMap().values(); }
/** * Returns a {@link Collection} view of the values contained in this map. * The collection is backed by the map, so changes to the map should be * reflected in the collection, and vice-versa. However, the implementation * does not reflect changes currently. * * @return a collection view of the values contained in this map */ @Override public Collection<Object> values() { return getMap().values(); }
/** * Returns a {@link Set} view of the mappings contained in this map. * The set is backed by the map, so changes to the map should be * reflected in the set, and vice-versa. However, the implementation * does not reflect changes currently. * * @return an entry set of a map */ public Set entrySet() { if (isEmpty()) return null; return getMap().entrySet(); }
/** * Returns a {@link Set} view of the mappings contained in this map. * The set is backed by the map, so changes to the map should be * reflected in the set, and vice-versa. However, the implementation * does not reflect changes currently. * * @return an entry set of a map */ public Set entrySet() { if (isEmpty()) return null; return getMap().entrySet(); }
@SuppressWarnings("unchecked") @Override public Map<String, Object> getBindings() { if(sc == null) return null; if(sc.getVarMap() != null) { return sc.getVarMap().getMap(); } else return null; } }
@SuppressWarnings("unchecked") @Override public Map<String, Object> getBindings() { if (sc == null) { return null; } if (sc.getVarMap() != null) { return sc.getVarMap().getMap(); } else { return null; } } }
@Override public ScriptExecutionResult execute(GameScript<EmbedEvalUnit> s, ScriptBindings bindings, boolean returnResult) throws Exception { PerThreadGameScript<EmbedEvalUnit> script = (PerThreadGameScript<EmbedEvalUnit>) s; ScriptingContainer scriptingContainer = executorPool.getLocalScriptingContainer(); scriptingContainer.getVarMap().putAll(bindings); if (!script.hasScript()) { script.setScript(scriptingContainer.parse(script.getContent())); } try { EmbedEvalUnit embedEvalUnit = script.getScript(); embedEvalUnit.run(); } catch (Exception e) { if(e.getCause() instanceof ScriptSkippedException) { throw new ScriptSkippedException(); } else { throw e; } } if (!returnResult) { scriptingContainer.clear(); return null; } ScriptExecutionResult executionResult = new ScriptExecutionResult(scriptingContainer.getVarMap().getMap()); scriptingContainer.clear(); return executionResult; }