Class ContainsAllMatcher

All Implemented Interfaces:
Matcher

public class ContainsAllMatcher extends AbstractSetMatcher

Matcher treats [value] and [pattern] as sets. Checks if [value] contains all elements from [pattern].

Formally:

p - set represented by [pattern] - pattern in matrix cell

v - set represented by [value] - input value for level (provided by levelCreator)

in - operator of concluding or equality for sets

Matcher returns the value of a logical sentence: p in v

Author:
przemek hertel
  • Method Details

    • doMatches

      public <T extends ValueHolder> boolean doMatches(String value, String pattern, Type<T> type)
      Checks if the set represented by [value] contains all elements from the set represented by [pattern]. Argument [value] must be a file serialized to a string using the separator matcher uses.
      Specified by:
      doMatches in class AbstractSetMatcher
      Parameters:
      value - serialized form of the set
      pattern - serialized form of the set in the cell - matching pattern
      type - cell type (level)