protected void clear() { synchronized (this) { ConfigValue oldValue = this.value; value = new NullConfigValue(this); oldValue.clear(); } } // }}}
protected void clear() { synchronized (this) { ConfigValue oldValue = this.value; value = new NullConfigValue(this); oldValue.clear(); } }
protected void clear() { synchronized (this) { ConfigValue oldValue = this.value; value = new NullConfigValue(this); oldValue.clear(); } }
protected void attachChild(SimpleConfigurationNode child) { if (isVirtual()) { throw new IllegalStateException("This parent is not currently attached. This is an internal state violation."); } if (!child.getParentAttached().equals(this)) { throw new IllegalStateException("Child " + child + " path is not a direct parent of me (" + this + "), cannot attach"); } ConfigValue oldValue, newValue; synchronized (this) { newValue = oldValue = this.value; if (!(oldValue instanceof MapConfigValue)) { if (child.key instanceof Integer) { if (oldValue instanceof NullConfigValue) { newValue = new ListConfigValue(this); } else if (!(oldValue instanceof ListConfigValue)) { newValue = new ListConfigValue(this, oldValue.getValue()); } } else { newValue = new MapConfigValue(this); } } possiblyDetach(newValue.putChild(child.key, child)); value = newValue; } if (newValue != oldValue) { oldValue.clear(); } child.attached = true; }
oldValue.clear();