Check the attributes

@param filter     the filter
@param attributes the attributes
@return the attributes
@throws IllegalArgumentException for a null filter
176819
private static VisitorAttributes checkAttributes(VirtualFileFilter filter, VisitorAttributes attributes) {
        if (filter == null) {
            throw MESSAGES.nullArgument("filter");
        }
        // Specified
        if (attributes != null) { return attributes; }
        // From the filter
        if (filter instanceof VirtualFileFilterWithAttributes) { return ((VirtualFileFilterWithAttributes) filter).getAttributes(); }
        // It will use the default
        return null;
    }
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());
    }
  }
988306
private List filterAttributes(final List<Object> valuesToFilter, final String attributeName) {
        return valuesToFilter
            .stream()
            .filter(this::patternMatchesAttributeValue)
            .peek(attributeValue -> logReleasedAttributeEntry(attributeName, attributeValue))
            .collect(Collectors.toList());
    }
949818
public GroupFilter where(Predicate<GroupMetadata> filter) {
        checkNotNull(filter, "Filter predicate must be not a null");

        this.predicate = this.predicate.and(filter);

        return this;
    }
420066
public static inat[] get_filtered(nitro_service service, String filter) throws Exception{
		inat obj = new inat();
		options option = new options();
		option.set_filter(filter);
		inat[] response = (inat[]) obj.getfiltered(service, option);
		return response;
	}
359490
public ImmutableMap<String, Object> readAttributes(File file, String attributes) {
    String view = getViewName(attributes);
    List<String> attrs = getAttributeNames(attributes);

    if (attrs.size() > 1 && attrs.contains(ALL_ATTRIBUTES)) {
      // attrs contains * and other attributes
      throw new IllegalArgumentException("invalid attributes: " + attributes);
    }

    Map<String, Object> result = new HashMap<>();
    if (attrs.size() == 1 && attrs.contains(ALL_ATTRIBUTES)) {
      // for 'view:*' format, get all keys for all providers for the view
      AttributeProvider provider = providersByName.get(view);
      readAll(file, provider, result);

      for (String inheritedView : provider.inherits()) {
        AttributeProvider inheritedProvider = providersByName.get(inheritedView);
        readAll(file, inheritedProvider, result);
      }
    } else {
      // for 'view:attr1,attr2,etc'
      for (String attr : attrs) {
        result.put(attr, getAttribute(file, view, attr));
      }
    }

    return ImmutableMap.copyOf(result);
  }
1293391
private List<CmsCategoryBean> getFilteredCategories(String filter) {

        List<CmsCategoryBean> result;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(filter)) {
            result = new ArrayList<CmsCategoryBean>();
            for (CmsCategoryBean category : getCategoryList()) {
                if (category.matchesFilter(filter)) {
                    result.add(category);
                }
            }
        } else {
            result = getCategoryList();
        }
        return result;
    }
1255073
public AntiAffinityPolicyFilter where(Predicate<AntiAffinityPolicyMetadata> filter) {
        checkNotNull(filter, "Filter predicate must be not a null");

        this.predicate = this.predicate.and(filter);

        return this;
    }
1243100
private boolean filterAttribute( final String name ) {
        if ( this.manager == null ) {
            throw new IllegalStateException( "There's no manager set." );
        }
        final Pattern pattern = ((SessionManager)manager).getMemcachedSessionService().getSessionAttributePattern();
        if ( pattern == null ) {
            return true;
        }
        return pattern.matcher(name).matches();
    }
919364
private static Map<String, String> attributeCriterionToFilters(AttributeCriterion criterion) {
		Map<String, String> filters = new LinkedHashMap<String, String>();
		String filter = criterion.getAttributeName() + " " + criterion.getOperator() + " ";
		if (criterion.getValue() != null
				&& ((criterion.getValue().contains("\"") || criterion.getValue().contains(" ") || !criterion.getValue()
						.matches("(\\.|\\-|[0-9])*")) || "LIKE".equalsIgnoreCase(criterion.getOperator()))
				&& ((!"DURING".equals(criterion.getOperator().toUpperCase())
						&& !"BEFORE".equals(criterion.getOperator().toUpperCase()) && !"AFTER".equals(criterion
						.getOperator().toUpperCase())))) {
			filter += "\'" + criterion.getValue().replaceAll("\\*", "%") + "\'";
		} else {
			filter += criterion.getValue();
		}
		filters.put(criterion.getServerLayerId(), filter);
		return filters;
	}
290176
@Override
    @JsonIgnore
    public Set<String> getAvailableQueryAttributes(final IPersonAttributeDaoFilter filter) {
        final IUsernameAttributeProvider usernameAttributeProvider = super.getUsernameAttributeProvider();
        return Collections.singleton(usernameAttributeProvider.getUsernameAttribute());
    }
930007
public Properties getAttributes(Attributes attrs) {
        Properties attributes = new Properties();
        attributes.putAll(attributeValues);
        if (defaultContent != null) {
            attributes.put(ElementTags.ITEXT, defaultContent);
        }
        if (attrs != null) {
            for (int i = 0; i < attrs.getLength(); i++) {
                String attribute = getName(attrs.getQName(i));
                attributes.setProperty(attribute, attrs.getValue(i));
            }
        }
        return attributes;
    }
242700
public static gslbsite[] get_filtered(nitro_service service, String filter) throws Exception{
		gslbsite obj = new gslbsite();
		options option = new options();
		option.set_filter(filter);
		gslbsite[] response = (gslbsite[]) obj.getfiltered(service, option);
		return response;
	}
324773
public void initFilter(FunDapterFilter<T> filter) {

        if (filter == null)
            throw new IllegalArgumentException("Cannot pass a null filter to FunDapter");

        this.funDapterFilter = filter;

        mFilter = new Filter() {

            @Override
            protected void publishResults(CharSequence constraint, FilterResults results) {

                @SuppressWarnings("unchecked") List<T> list = (List<T>) results.values;

                if (results.count == 0) {
                    resetData();
                } else {
                    mDataItems = list;
                }

                notifyDataSetChanged();
            }

            @Override
            protected FilterResults performFiltering(CharSequence constraint) {

                FilterResults results = new FilterResults();
                if (constraint == null || constraint.length() == 0) {

                    // No constraint - no point in filtering.
                    results.values = mOrigDataItems;
                    results.count = mOrigDataItems.size();
                } else {
                    // Perform the filtering operation

                    List<T> filter =
                            funDapterFilter.filter(constraint.toString(), mOrigDataItems);

                    results.count = filter.size();
                    results.values = filter;

                }

                return results;
            }
        };
    }
244972
private AccessPredicateConfigAttribute find(final Collection<ConfigAttribute> attributes) {
        for (final ConfigAttribute attribute : attributes) {
            if (attribute instanceof AccessPredicateConfigAttribute) {
                return (AccessPredicateConfigAttribute) attribute;
            }
        }
        return null;
    }
718062
public void validateAttributes(Collection<String> attributes) throws CompatibilityException {
                Validate.notNull(attributes);
                for (String attribute : attributes) {
                        validateAttribute(attribute);
                }
        }
1175756
@JsonIgnore
    @Override
    public Set<String> getAvailableQueryAttributes(final IPersonAttributeDaoFilter filter) {
        return this.targetPersonAttributeDao.getAvailableQueryAttributes(filter);
    }