Class SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>

Object
org.anchoranalysis.plugin.mpp.shared.SharedStateRememberConverted<U,​S>
Type Parameters:
U - type an input is converted to
S - shared-state type

public class SharedStateRememberConverted<U extends org.anchoranalysis.io.input.InputFromManager,​S>
extends Object
Shared-state that remembers converted inputs for corresponding unconverted inputs.

This class is intended as the shared-state for ConvertNamedChannels.

Author:
Owen Feehan
  • Constructor Details

  • Method Details

    • rememberConverted

      public void rememberConverted​(org.anchoranalysis.image.io.channel.input.NamedChannelsInput unconverted, U converted, StringBuilder loggedMesssages)
      Remembers a converted input.
      Parameters:
      unconverted - the unconverted value
      converted - the converted value
      loggedMesssages - any messages logged during the conversion.
    • findConvertedInputFor

      public Optional<U> findConvertedInputFor​(org.anchoranalysis.image.io.channel.input.NamedChannelsInput unconverted, org.anchoranalysis.core.log.MessageLogger logger)
      Finds a converted-input that has been remembered.
      Parameters:
      unconverted - the unconverted input
      logger - where to log any messages that occurred during conversion.
      Returns:
      the corresponding convrted input for unconverted, if it exists.
    • forgetAll

      public void forgetAll()
      Forgets all converted inputs.
    • getSharedState

      public S getSharedState()
      The shared state.
    • setSharedState

      public void setSharedState​(S sharedState)
      The shared state.