SetAll + UnsetAll

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

SetAll + UnsetAll

Would the methods

     * Unassign the all variable names. Name should evaluate to a variable.
    public void unsetAll(Collection<String> keys) throws EvalError {
    for (String key : keys) {

    public void setAll(Map<String, ?> properties) throws EvalError {
    for (Map.Entry<String, ?> entry : properties.entrySet()) {
       interpreter.set(entry.getKey(), entry.getValue());

make sense in the bsh.Interpreter class?

In may application I created such Methods and they are very convenient.