1 4 package com.tc.config.schema.dynamic; 5 6 9 public class MockConfigItemListener implements ConfigItemListener { 10 11 private int numValueChangeds; 12 private Object lastOldValue; 13 private Object lastNewValue; 14 15 public MockConfigItemListener() { 16 reset(); 17 } 18 19 public void reset() { 20 this.numValueChangeds = 0; 21 this.lastOldValue = null; 22 this.lastNewValue = null; 23 } 24 25 public void valueChanged(Object oldValue, Object newValue) { 26 ++this.numValueChangeds; 27 this.lastOldValue = oldValue; 28 this.lastNewValue = newValue; 29 } 30 31 public Object getLastNewValue() { 32 return lastNewValue; 33 } 34 35 public Object getLastOldValue() { 36 return lastOldValue; 37 } 38 39 public int getNumValueChangeds() { 40 return numValueChangeds; 41 } 42 43 } 44 | Popular Tags |