Package it.tidalwave.role.ui.function
Class WeakCopyFunctionSupport<T>
- java.lang.Object
-
- it.tidalwave.role.ui.function.BoundFunctionSupport<DOMAIN_TYPE,CODOMAIN_TYPE>
-
- it.tidalwave.role.ui.function.UnaryBoundFunctionSupport<T,T>
-
- it.tidalwave.role.ui.function.WeakCopyFunctionSupport<T>
-
- All Implemented Interfaces:
Changeable<T>,ChangingSource<T>,BoundFunction<T,T>
- Direct Known Subclasses:
CopyIfEmptyOrConform
public abstract class WeakCopyFunctionSupport<T> extends UnaryBoundFunctionSupport<T,T> implements Changeable<T>
Changes the destination only at a certain condition in function of the target.- Author:
- Fabrizio Giudici
-
-
Field Summary
Fields Modifier and Type Field Description protected TtargetValue-
Fields inherited from class it.tidalwave.role.ui.function.UnaryBoundFunctionSupport
source, value
-
-
Constructor Summary
Constructors Constructor Description WeakCopyFunctionSupport(ChangingSource<T> source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Tfunction(T value)protected voidonSourceChange(T oldSourceValue, T newSourceValue)voidset(T value)Sets a new value to this object.protected abstract booleanshouldChange(T oldValue, T newValue)-
Methods inherited from class it.tidalwave.role.ui.function.UnaryBoundFunctionSupport
get
-
Methods inherited from class it.tidalwave.role.ui.function.BoundFunctionSupport
fireValueChanged, fireValueChanged, unbindAll
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.tidalwave.role.ui.ChangingSource
addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener
-
-
-
-
Field Detail
-
targetValue
@Nonnull protected T targetValue
-
-
Constructor Detail
-
WeakCopyFunctionSupport
public WeakCopyFunctionSupport(@Nonnull ChangingSource<T> source)
-
-
Method Detail
-
onSourceChange
protected void onSourceChange(@Nonnull T oldSourceValue, @Nonnull T newSourceValue)- Overrides:
onSourceChangein classUnaryBoundFunctionSupport<T,T>
-
set
public void set(T value)
Description copied from interface:ChangeableSets a new value to this object.- Specified by:
setin interfaceChangeable<T>- Parameters:
value- the new value
-
-