Indicates the specified entity instance matches to this
{@code ComparableFilter}.
554603
@Override
	public boolean matches(Object entity) {
		T left = property.get(entity);
		return operator().matches(left.compareTo(value()));
	}
115740
private static boolean isRunnable(FilterTargetData targetData, List<FilterDefinition> filters) {
        if (filters == null || filters.isEmpty()) {
            return true;
        }

        for (FilterDefinition filterDefinition : filters) {
            String type = filterDefinition.getType();
            String text = filterDefinition.getText();

            if (type == null || type.isEmpty()) {
                type = "*";
            }

            // We must evaluate all the filters and return only when there is a valid match
            if (
                (type.equalsIgnoreCase("*") && targetData.anyMatch(text)) || // Any filter
                    ("key".equalsIgnoreCase(type) && targetData.keyMatch(text)) || // Key filter
                    ("fp".equalsIgnoreCase(type) && targetData.fingerpringMatch(text)) || // Fingerprint filter
                    ("name".equalsIgnoreCase(type) && targetData.nameMatch(text)) || // Name filter
                    ("tag".equalsIgnoreCase(type) && targetData.tagMatch(text)) || // Tag filter
                    ("ticket".equalsIgnoreCase(type) && targetData.ticketMatch(text)) // Ticket filter
                ) {
                return true;
            }
        }

        return false;
    }
717078
protected boolean matchesFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException {
        for (TypeFilter filter : ENTITY_TYPE_FILTERS) {
            if (filter.match(reader, readerFactory)) {
                return true;
            }
        }
        return false;
    }
227383
public <E extends Exception> boolean allMatch(Try.BytePredicate<E> filter) throws E {
        return allMatch(0, size(), filter);
    }
1167508
public <E extends Exception> boolean anyMatch(Try.IntPredicate<E> filter) throws E {
        return anyMatch(0, size(), filter);
    }
409571
protected final boolean matches(ConditionContext context,
			AnnotatedTypeMetadata metadata, Condition condition) {
		if (condition instanceof SpringBootCondition) {
			return ((SpringBootCondition) condition).getMatchOutcome(context, metadata)
					.isMatch();
		}
		return condition.matches(context, metadata);
	}
265153
@Override
    public boolean containsWithinBounds(Object value) {
        if (value instanceof Comparable) {
            final int result = compareTo(from, (Comparable) value);
            return result == 0 || result < 0 && compareTo(to, (Comparable) value) >= 0;
        }
        return contains(value);
    }
1314584
public ResultMatcher isNotEqualTo(final Object expected) {
        return new AbstractResultMatcher(path, configuration) {
            public void doMatch(Object actual) {
                Diff diff = createDiff(expected, actual);
                if (diff.similar()) {
                    failWithMessage("JSON is equal.");
                }
            }
        };
    }
986653
@SuppressWarnings("checkstyle:npathcomplexity")
    @Override
    public int doFilter(EventFilter filter, Data dataKey, Object oldValue, Object dataValue, EntryEventType eventType,
                        String mapNameOrNull) {
        if (filter instanceof MapPartitionLostEventFilter) {
            return FILTER_DOES_NOT_MATCH;
        }

        // the order of the following ifs is important!
        // QueryEventFilter is instance of EntryEventFilter
        if (filter instanceof EventListenerFilter) {
            if (!filter.eval(eventType.getType())) {
                return FILTER_DOES_NOT_MATCH;
            } else {
                filter = ((EventListenerFilter) filter).getEventFilter();
            }
        }
        if (filter instanceof TrueEventFilter) {
            return eventType.getType();
        }
        if (filter instanceof QueryEventFilter) {
            return processQueryEventFilter(filter, eventType, dataKey, oldValue, dataValue, mapNameOrNull)
                    ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        if (filter instanceof EntryEventFilter) {
            return processEntryEventFilter(filter, dataKey) ? eventType.getType() : FILTER_DOES_NOT_MATCH;
        }
        throw new IllegalArgumentException("Unknown EventFilter type = [" + filter.getClass().getCanonicalName() + "]");
    }
999535
public boolean isSameFilter(BaseMessageFilter filter)
    {
        if (filter.getClass().equals(this.getClass()))
        {
            if (filter.isFilterMatch(this))
                ;   // return true;? todo (don) You need to figure out how to compare filters
        }
        return false;
    }
479892
private void validateFilter(Filter filter) throws IllegalArgumentException {
    switch (filter.getFilterTypeCase()) {
      case COMPOSITE_FILTER:
        for (Filter subFilter : filter.getCompositeFilter().getFiltersList()) {
          validateFilter(subFilter);
        }
        break;
      case PROPERTY_FILTER:
        if (UNSUPPORTED_OPERATORS.contains(filter.getPropertyFilter().getOp())) {
          throw new IllegalArgumentException("Query cannot have any inequality filters.");
        }
        break;
      default:
        throw new IllegalArgumentException(
            "Unsupported filter type: " + filter.getFilterTypeCase());
    }
  }
799466
def match(other)
      other = other.type if other.instance_of? AnnotatedArgType
      return true if other.instance_of? WildQuery
      return false unless other.instance_of? MethodType
      return false unless @ret.match(other.ret)
      if @block == nil
        return false unless other.block == nil
      else
        return false if other.block == nil
        return false unless @block.match(other.block)
      end
      # Check arg matches; logic is similar to pre_cond
      states = [[0,0]] # [position in self, position in other]
      until states.empty?
        s_arg, o_arg = states.pop
        return true if s_arg == @args.size && o_arg == other.args.size # everything matches
        next if s_arg >= @args.size # match not possible, not enough args in self
        if @args[s_arg].instance_of? DotsQuery then
          if o_arg == other.args.size
            # no args left in other, skip ...
            states << [s_arg+1, o_arg]
          else
            states << [s_arg+1, o_arg+1] # match, no more matches to ...
            states << [s_arg, o_arg+1]   # match, more matches to ... coming
          end
        else
          next if o_arg == other.args.size # match not possible, not enough args in other
          s_arg_t = @args[s_arg]
          s_arg_t = s_arg_t.type if s_arg_t.instance_of? AnnotatedArgType
          o_arg_t = other.args[o_arg]
          o_arg_t = o_arg_t.type if o_arg_t.instance_of? AnnotatedArgType
          next unless s_arg_t.match(o_arg_t)
          states << [s_arg+1, o_arg+1]
        end
      end
      return false
    end
193770
protected Example doFilter(Example example)
    {
        Example result = example;

        while ( !isBeginTag(result) && !isEndTag(result) )
        {
            if (result.nextSibling() == null)
            {
                return getNextEndTag(example) == null ? null : example;
            }
            result = result.nextSibling();
        }

        return filter(result.nextSibling());
    }
401219
@Override
	public boolean filter(Object entity) {
		for (Filter filter : filters) {
			if (filter.filter(entity)) {
				return true;
			}
		}

		return false;
	}
230152
@Override
    public boolean matches(Object obj) {
        if (!(obj instanceof Throwable))
            return false;

        Throwable throwable = (Throwable) obj;

        return throwable.getCause() == null;
    }
925623
public static Map<String, Object> onComparisonExpression(Expression expression, EntityMetadata m,
            KunderaMetadata kunderaMetadata, KunderaQuery kunderaQuery)
    {
        ComparisonExpression compExp = (ComparisonExpression) expression;

        String condition = compExp.getIdentifier();
        Expression sfpExp = compExp.getLeftExpression();
        Map<String, Object> map = KunderaQueryUtils.setFieldClazzAndColumnFamily(sfpExp, m, kunderaMetadata);
        Object value = KunderaQueryUtils.getValue(compExp.getRightExpression(), (Class) map.get(Constants.FIELD_CLAZZ),
                kunderaQuery);
        kunderaQuery.addFilterClause(
              (String) map.get(Constants.COL_NAME), condition, value,
              (String) map.get(Constants.FIELD_NAME), (Boolean) map.get(Constants.IGNORE_CASE));
        return map;

    }
461058
public Criteria matches(Predicate p) {
        this.criteriaType = RelationalOperator.MATCHES;
        this.right = new PredicateNode(p);
        return this;
    }