/** * Removes and returns scope entry associated with the given name, if present. Otherwise * delegates removal to parent scope, if one exists. Otherwise returns null to indicate that * nothing was removed. * @param name Name of the key to be removed * @return Scope entry that has been removed, or null if no removal took place */ public ScopeEntry remove(String name) { if (variableMapping.containsKey(name)) { return variableMapping.remove(name); } if (hasParent()) { return parent.remove(name); } return null; }