@Override protected void onSourceChange (final String oldSourceValue, final String newSourceValue) { final boolean oldValue = function(oldSourceValue); value = function(newSourceValue); fireValueChanged(oldValue, (boolean)value); }
@Override public void propertyChange (final @Nonnull PropertyChangeEvent event) { newValue = function(); fireValueChanged(oldValue, newValue); oldValue = newValue; }; };
protected void onSourceChange (final @Nonnull DOMAIN_TYPE oldSourceValue, final @Nonnull DOMAIN_TYPE newSourceValue) { final CODOMAIN_TYPE oldValue = function(oldSourceValue); value = function(newSourceValue); fireValueChanged(oldValue, value); }
@Override protected void onSourceChange (final @Nonnull T oldSourceValue, final @Nonnull T newSourceValue) { final T oldValue = function(oldSourceValue); final T newValue = function(newSourceValue); if (shouldChange(oldValue, newValue)) { value = newValue; fireValueChanged(oldValue, newValue); } }
@Nonnull public static NonEmptyFunction nonEmpty (final @Nonnull ChangingSource<String> source) { return new NonEmptyFunction(source); }
@Nonnull public static AndFunction and (final @Nonnull ChangingSource<Boolean> ... sources) { return new AndFunction(sources); }
@Nonnull public static OrFunction or (final @Nonnull ChangingSource<Boolean> ... sources) { return new OrFunction(sources); }
@Nonnull public static CopyIfEmptyOrConform copyIfEmptyOrConform (final @Nonnull ChangingSource<String> source) { return new CopyIfEmptyOrConform(source); }
public BooleanBoundFunctionSupport (final @Nonnull ChangingSource<Boolean> ... sources) { this.sources = sources; for (final ChangingSource<Boolean> source : sources) { source.addPropertyChangeListener(pcl); } oldValue = function(); }
@Override public void propertyChange (final @Nonnull PropertyChangeEvent event) { onSourceChange((DOMAIN_TYPE)event.getOldValue(), (DOMAIN_TYPE)event.getNewValue()); } });
@Override protected void onSourceChange (final @Nonnull T oldSourceValue, final @Nonnull T newSourceValue) { final T oldValue = function(oldSourceValue); final T newValue = function(newSourceValue); if (shouldChange(oldValue, newValue)) { value = newValue; fireValueChanged(oldValue, newValue); } }
@Override protected void onSourceChange (final String oldSourceValue, final String newSourceValue) { final boolean oldValue = function(oldSourceValue); value = function(newSourceValue); fireValueChanged(oldValue, (boolean)value); }
protected void onSourceChange (final @Nonnull DOMAIN_TYPE oldSourceValue, final @Nonnull DOMAIN_TYPE newSourceValue) { final CODOMAIN_TYPE oldValue = function(oldSourceValue); value = function(newSourceValue); fireValueChanged(oldValue, value); }
@Override public void propertyChange (final @Nonnull PropertyChangeEvent event) { newValue = function(); fireValueChanged(oldValue, newValue); oldValue = newValue; }; };
@Nonnull public static NonEmptyFunction nonEmpty (final @Nonnull ChangingSource<String> source) { return new NonEmptyFunction(source); }
@Nonnull public static AndFunction and (final @Nonnull ChangingSource<Boolean> ... sources) { return new AndFunction(sources); }
@Nonnull public static OrFunction or (final @Nonnull ChangingSource<Boolean> ... sources) { return new OrFunction(sources); }
@Nonnull public static CopyIfEmptyOrConform copyIfEmptyOrConform (final @Nonnull ChangingSource<String> source) { return new CopyIfEmptyOrConform(source); }
public BooleanBoundFunctionSupport (final @Nonnull ChangingSource<Boolean> ... sources) { this.sources = sources; for (final ChangingSource<Boolean> source : sources) { source.addPropertyChangeListener(pcl); } oldValue = function(); }
@Override public void propertyChange (final @Nonnull PropertyChangeEvent event) { onSourceChange((DOMAIN_TYPE)event.getOldValue(), (DOMAIN_TYPE)event.getNewValue()); } });