Implement an Observer::setValue function.