Class TypeChecker
- java.lang.Object
-
- science.aist.imaging.api.typecheck.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 Summary
Constructors Constructor Description TypeChecker(Collection<ChannelType> supportedTypes)
TypeChecker(ChannelType... supportedTypes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(ImageWrapper<?> imageWrapper)
Checks if the imageWrapper fits to one of the supported types
-
-
-
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 interfaceConsumer<ImageWrapper<?>>
- Parameters:
imageWrapper
- the image wrapper- Throws:
TypeException
- if the image wrapper is not one of the supported types
-
-