Class IfParamEquals
- All Implemented Interfaces:
Provider<Channel>,ProviderAsStack
Provides a channel based on a condition from a dictionary.
This class extends ChannelProviderUnary to return either the input channel or an
alternative channel based on a condition specified in a dictionary.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel(Channel channel) Creates aChannelgiven the entity provided by the delegate.The channel provider to use if the condition is false.The condition to evaluate from the dictionary.voidsetChannelElse(ChannelProvider channelElse) The channel provider to use if the condition is false.voidsetCondition(DictionaryCondition condition) The condition to evaluate from the dictionary.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannelMethods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
IfParamEquals
public IfParamEquals()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnaryCreates aChannelgiven the entity provided by the delegate.- Specified by:
createFromChannelin classChannelProviderUnary- Parameters:
channel- the entity provided by the delegate.- Returns:
- the created
Channelthat is returned by the provider. - Throws:
ProvisionFailedException- if the provider cannot complete successfully.
-
getCondition
The condition to evaluate from the dictionary. -
setCondition
The condition to evaluate from the dictionary. -
getChannelElse
The channel provider to use if the condition is false. -
setChannelElse
The channel provider to use if the condition is false.
-