/*
 * Copyright (c) 2009-2013 Topi Nieminen
 */
package fi.tnie.db.model;

public class DefaultMutableValueModel<V>
	extends AbstractMutableValueModel<V> {

	private V value;
	
	public DefaultMutableValueModel() {
		super();
	}

	public DefaultMutableValueModel(V value) {
		super();
		this.value = value;
	}
	
	@Override
	public V get() {
		return this.get();
	}

	@Override
	public void set(V newValue) {
		V from = this.value;
		this.value = newValue;
		fireIfChanged(from, this.value);
	}
}

/*
 * Copyright (c) 2009-2013 Topi Nieminen
 */
package fi.tnie.db.model;

public class DefaultMutableValueModel<V>
	extends AbstractMutableValueModel<V> {

	private V value;
	
	public DefaultMutableValueModel() {
		super();
	}

	public DefaultMutableValueModel(V value) {
		super();
		this.value = value;
	}
	
	@Override
	public V get() {
		return this.value;
	}

	@Override
	public void set(V newValue) {
		V from = this.value;
		this.value = newValue;
		fireIfChanged(from, this.value);
	}
}

Fix bug in DefaultMutableValueModel: endless recursion