Class TypeChecker

  • All Implemented Interfaces:
    Consumer<ImageWrapper<?>>

    public class TypeChecker
    extends Object
    implements Consumer<ImageWrapper<?>>

    Checks if the image wrapper matches to one of the supported types

    Since:
    1.0
    Author:
    Andreas Pointner
    • Constructor Detail

      • TypeChecker

        public TypeChecker​(Collection<ChannelType> supportedTypes)
        Parameters:
        supportedTypes - The supported types
      • TypeChecker

        public TypeChecker​(ChannelType... supportedTypes)
        Parameters:
        supportedTypes - The supported types
    • Method Detail

      • accept

        public void accept​(ImageWrapper<?> imageWrapper)
        Checks if the imageWrapper fits to one of the supported types
        Specified by:
        accept in interface Consumer<ImageWrapper<?>>
        Parameters:
        imageWrapper - the image wrapper
        Throws:
        TypeException - if the image wrapper is not one of the supported types