Пример #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);
 }