/** * Returns the value in BiVariable type to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param name is the key whose associated BiVariable object is to be returned * @return the BiVariable type object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ //@Deprecated public BiVariable getVariable(final String name) { return getVariable(getTopSelf(), name); }
/** * Returns the value in BiVariable type to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param name is the key whose associated BiVariable object is to be returned * @return the BiVariable type object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ //@Deprecated public BiVariable getVariable(final String name) { return getVariable(getTopSelf(), name); }
/** * Returns the value in BiVariable type to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated BiVariable object is to be returned * @return the BiVariable type object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ @Deprecated public BiVariable getVariable(String key) { return getVariable((RubyObject)provider.getRuntime().getTopSelf(), key); }
/** * Returns the value in BiVariable type to which the specified key is mapped, * or {@code null} if this map contains no mapping for the key. * * @param key is the key whose associated BiVariable object is to be returned * @return the BiVariable type object to which the specified key is mapped, or * {@code null} if this map contains no mapping for the key */ @Deprecated public BiVariable getVariable(String key) { return getVariable((RubyObject)provider.getRuntime().getTopSelf(), key); }
private static void updateGlobalVar(final BiVariableMap vars, final RubyObject receiver, final String name, final IRubyObject value) { BiVariable var = vars.getVariable(receiver, name); if (var != null) { var.setRubyObject(value); } else { var = new GlobalVariable(receiver, name, value); vars.update(name, var); } }
public void updateVariable(final RubyObject receiver, final String name, final IRubyObject value, final Class<? extends BiVariable> type) { final BiVariable var = getVariable(receiver, name); if (var != null) { var.setRubyObject(value); } else { update(name, newVariable(receiver, name, value, type)); } }
public void updateVariable(final RubyObject receiver, final String name, final IRubyObject value, final Class<? extends BiVariable> type) { final BiVariable var = getVariable(receiver, name); if (var != null) { var.setRubyObject(value); } else { update(name, newVariable(receiver, name, value, type)); } }
private static void updateGlobalVar(final BiVariableMap vars, final RubyObject receiver, final String name, final IRubyObject value) { BiVariable var = vars.getVariable(receiver, name); if (var != null) { var.setRubyObject(value); } else { var = new GlobalVariable(receiver, name, value); vars.update(name, var); } }
private static void updateLocalGlobal(RubyObject receiver, BiVariableMap vars, String name, IRubyObject value) { BiVariable var; if (vars.containsKey((Object) name)) { var = vars.getVariable(receiver, name); var.setRubyObject(value); } else { var = new LocalGlobalVariable(receiver, name, value); vars.update(name, var); } }
private static void updateGlobalVar(BiVariableMap vars, RubyObject receiver, String name, IRubyObject value) { BiVariable var; if (vars.containsKey((Object) name)) { var = vars.getVariable(receiver, name); var.setRubyObject(value); } else { var = new GlobalVariable(receiver, name, value); vars.update(name, var); } }
private static void updateGlobalVar(BiVariableMap vars, RubyObject receiver, String name, IRubyObject value) { BiVariable var; if (vars.containsKey((Object) name)) { var = vars.getVariable(receiver, name); var.setRubyObject(value); } else { var = new GlobalVariable(receiver, name, value); vars.update(name, var); } }
private static void updateLocalGlobal(RubyObject receiver, BiVariableMap vars, String name, IRubyObject value) { BiVariable var; if (vars.containsKey((Object) name)) { var = vars.getVariable(receiver, name); var.setRubyObject(value); } else { var = new LocalGlobalVariable(receiver, name, value); vars.update(name, var); } }
public void setVariable(final RubyObject receiver, final BiVariable var) { if ( var == null ) return; final String key = var.getName(); final BiVariable old = getVariable(receiver, key); if (old != null) { // updates the value of an existing key-value pair old.setJavaObject(receiver.getRuntime(), var.getJavaObject()); } else { update(key, var); } }
public void setVariable(final RubyObject receiver, final BiVariable var) { if ( var == null ) return; final String key = var.getName(); final BiVariable old = getVariable(receiver, key); if (old != null) { // updates the value of an existing key-value pair old.setJavaObject(receiver.getRuntime(), var.getJavaObject()); } else { update(key, var); } }
public void setVariable(RubyObject receiver, BiVariable var) { if (var == null) { return; } String key = var.getName(); BiVariable old = getVariable(receiver, key); if (old != null) { // updates the value of an existing key-value pair old.setJavaObject(receiver.getRuntime(), var.getJavaObject()); } else { update(key, var); } }
public IRubyObject getInstanceVariable(IRubyObject obj, String variableName) { BiVariableMap map = container.getVarMap(); synchronized (map) { if (map.containsKey(variableName)) { BiVariable bv = map.getVariable((RubyObject)container.getProvider().getRuntime().getTopSelf(), variableName); return bv.getRubyObject(); } } return null; }
public IRubyObject getInstanceVariable(IRubyObject obj, String variableName) { BiVariableMap map = container.getVarMap(); synchronized (map) { if (map.containsKey(variableName)) { BiVariable bv = map.getVariable((RubyObject)container.getProvider().getRuntime().getTopSelf(), variableName); return bv.getRubyObject(); } } return null; }
public IRubyObject getInstanceVariable(IRubyObject obj, String variableName) { BiVariableMap map = container.getVarMap(); synchronized (map) { if (map.containsKey(variableName)) { BiVariable bv = map.getVariable((RubyObject)container.getProvider().getRuntime().getTopSelf(), variableName); return bv.getRubyObject(); } } return null; }
public IRubyObject getInstanceVariable(IRubyObject obj, String variableName) { BiVariableMap map = container.getVarMap(); synchronized (map) { if (map.containsKey(variableName)) { BiVariable bv = map.getVariable((RubyObject)container.getProvider().getRuntime().getTopSelf(), variableName); return bv.getRubyObject(); } } return null; }
public IRubyObject setInstanceVariable(IRubyObject obj, String variableName, IRubyObject value) { BiVariableMap map = container.getVarMap(); synchronized (map) { if (map.containsKey(variableName)) { BiVariable bv = map.getVariable((RubyObject)container.getProvider().getRuntime().getTopSelf(), variableName); bv.setRubyObject(value); } else { InstanceVariable iv = new InstanceVariable(obj, variableName, value); map.update(variableName, iv); } } return obj.getInstanceVariables().setInstanceVariable(variableName, value); }