Added PatternMatcher - a class to check an object against several patterns