@Test public void defaultValue() { StringProperty original = stringProperty("p"); Property<String> derived = PropertyUtils.defaultValue(original, "isnull"); assertThat(derived.get(), is("isnull")); original.set("somevalue"); assertThat(derived.get(), is("somevalue")); }
public static <T> Property<T> defaultValue(final Property<T> original, final T defaultValue) { return original.addDerived(new BasicProperty<T>(new DerivedValue<T>() { public T get() { return ObjectUtils.defaultValue(original.get(), defaultValue); } })); }
PropertyUtils { public static <T> Property<T> defaultValue(final Property<T> original, final T defaultValue) { return original.addDerived(new BasicProperty<T>(new DerivedValue<T>() { public T get() { return ObjectUtils.defaultValue(original.get(), defaultValue); } })); } }
PropertyUtils { public static <T> Property<T> defaultValue(final Property<T> original, final T defaultValue) { return original.addDerived(new BasicProperty<T>(new DerivedValue<T>() { public T get() { return ObjectUtils.defaultValue(original.get(), defaultValue); } })); }  }
PropertyUtils { public static <T> Property<T> defaultValue(final Property<T> original, final T defaultValue) { return original.addDerived(new BasicProperty<T>(new DerivedValue<T>() { public T get() { return ObjectUtils.defaultValue(original.get(), defaultValue); } })); }  static Property<T> defaultValue(final Property<T> original, final T defaultValue); static void syncModelsToGroup(final PropertyGroup all, final ListProperty<M> models); }
PropertyUtils { public static <T> Property<T> defaultValue(final Property<T> original, final T defaultValue) { return original.addDerived(new BasicProperty<T>(new DerivedValue<T>() { public T get() { return ObjectUtils.defaultValue(original.get(), defaultValue); } })); }  static Property<T> defaultValue(final Property<T> original, final T defaultValue); static void syncModelsToGroup(final PropertyGroup all, final ListProperty<M> models);  }