예제 #1
0
public class BlockSizeImpl implements BlockSize {

  private final ListenerRegistry<Integer> _listenerRegistry = ListenerRegistry.newInstance();
  private int _value;

  public void register(Listener4<Integer> listener) {
    _listenerRegistry.register(listener);
  }

  public void set(int newValue) {
    _value = newValue;
    _listenerRegistry.notifyListeners(_value);
  }

  public int value() {
    return _value;
  }
}
예제 #2
0
 public void set(int newValue) {
   _value = newValue;
   _listenerRegistry.notifyListeners(_value);
 }
예제 #3
0
 public void register(Listener4<Integer> listener) {
   _listenerRegistry.register(listener);
 }