@Override
  public void propertyChange(PropertyChangeEvent evt) {
    if (evt.getSource() == predicate) {
      switch (evt.getPropertyName()) {
        case "max": {
          T newValue = (T) evt.getNewValue();
          if (value.compareTo(newValue) > 0) {
            setValue(newValue);
          }
          break;
        }
        case "min": {
          T newValue = (T) evt.getNewValue();
          if (value.compareTo(newValue) < 0) {
            setValue(newValue);
          }
          break;
        }
      }
    }
  }