1 11 12 package org.eclipse.jface.internal.databinding.provisional.observable.value; 13 14 import org.eclipse.jface.internal.databinding.provisional.observable.Diffs; 15 16 20 public class WritableValue extends AbstractObservableValue { 21 22 private final Object valueType; 23 24 27 public WritableValue(Object initialValue) { 28 this(null, initialValue); 29 } 30 31 34 public WritableValue(Class type) { 35 this(type, null); 36 } 37 38 42 public WritableValue(Object valueType, Object initialValue) { 43 this.valueType = valueType; 44 this.value = initialValue; 45 } 46 47 private Object value = null; 48 49 public Object doGetValue() { 50 return value; 51 } 52 53 57 public void setValue(Object value) { 58 fireValueChange(Diffs.createValueDiff(this.value, this.value = value)); 59 } 60 61 public Object getValueType() { 62 return valueType; 63 } 64 65 } 66 | Popular Tags |