class OptionalProperty extends AbstractProperty<Optional<T>> implements ObservableOptional<T> {

  public final void setValue(@NotNull T value) {
    Optional<T> opt = get();
    if (!opt.isPresent() || !opt.get().equals(value)) {
      set(Optional.of(value));
    }
  }

}