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 aChannel
given the entity provided by the delegate.The channel provider to use if the condition is false.The condition to evaluate from the dictionary.void
setChannelElse
(ChannelProvider channelElse) The channel provider to use if the condition is false.void
setCondition
(DictionaryCondition condition) The condition to evaluate from the dictionary.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannel
Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStack
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods 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:ChannelProviderUnary
Creates aChannel
given the entity provided by the delegate.- Specified by:
createFromChannel
in classChannelProviderUnary
- Parameters:
channel
- the entity provided by the delegate.- Returns:
- the created
Channel
that 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.
-