Convert the given item parameters list into an {@code ItemRuleList}.

@param itemParametersList the item parameters list to convert
@return the item rule list
@throws IllegalRuleException if an illegal rule is found
960353
public static ItemRuleList toItemRuleList(List<ItemParameters> itemParametersList) throws IllegalRuleException {
        ItemRuleList itemRuleList = new ItemRuleList();
        for (ItemParameters parameters : itemParametersList) {
            itemRuleList.add(ItemRule.toItemRule(parameters));
        }
        return itemRuleList;
    }
192513
protected List<Item> doFilter(List<Item> items, ItemFilter filter, boolean runningBeforeProcessing) {
        List<Item> acceptedItems = new ArrayList<>();
        List<Item> rejectedItems = new ArrayList<>();

        for (Item item : items) {
            if (filter.accepts(item, acceptedItems, rejectedItems, runningBeforeProcessing)) {
                acceptedItems.add(item);
            } else {
                rejectedItems.add(item);
            }
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Items filtered from " + items + " by " + filter + ": " + acceptedItems);
        }

        return acceptedItems;
    }
1092323
public void setCrawlerMetricsList(java.util.Collection<CrawlerMetrics> crawlerMetricsList) {
        if (crawlerMetricsList == null) {
            this.crawlerMetricsList = null;
            return;
        }

        this.crawlerMetricsList = new java.util.ArrayList<CrawlerMetrics>(crawlerMetricsList);
    }
61267
public java.util.List<? extends com.google.appengine.v1.UrlDispatchRuleOrBuilder> 
      getDispatchRulesOrBuilderList() {
    return dispatchRules_;
  }
8448
protected CmsListItem makeUserItem(CmsUser user) {

        CmsListItem item = getList().newItem(user.getId().toString());
        item.set(LIST_COLUMN_LOGIN, user.getName());
        item.set(LIST_COLUMN_NAME, user.getSimpleName());
        item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn());
        item.set(LIST_COLUMN_FULLNAME, user.getFullName());
        return item;
    }
906946
def ToParameter(item: StackItem):
        
        if isinstance(item, Array) or isinstance(item, Struct):
            items = item.GetArray()
            output = [ContractParameter.ToParameter(subitem) for subitem in items]
            return ContractParameter(type=ContractParameterType.Array, value=output)

        elif isinstance(item, Boolean):
            return ContractParameter(type=ContractParameterType.Boolean, value=item.GetBoolean())

        elif isinstance(item, ByteArray):
            return ContractParameter(type=ContractParameterType.ByteArray, value=item.GetByteArray())

        elif isinstance(item, Integer):
            return ContractParameter(type=ContractParameterType.Integer, value=str(item.GetBigInteger()))

        elif isinstance(item, InteropInterface):
            return ContractParameter(type=ContractParameterType.InteropInterface, value=item.GetInterface())
1236468
public List<CmsJspNavElement> getItems() {

        if (m_items == null) {
            switch (m_type) {
                // calculate the results based on the given parameters
                case forFolder:
                    if (m_startLevel == Integer.MIN_VALUE) {
                        // no start level set
                        if (m_resource == null) {
                            m_items = m_builder.getNavigationForFolder();
                        } else {
                            m_items = m_builder.getNavigationForFolder(m_resource);
                        }
                    } else {
                        // start level is set
                        if (m_resource == null) {
                            m_items = m_builder.getNavigationForFolder(m_startLevel);
                        } else {
                            m_items = m_builder.getNavigationForFolder(m_resource, m_startLevel);
                        }
                    }
                    break;
                case forSite:
                    if (m_resource == null) {
                        m_items = m_builder.getSiteNavigation();
                    } else {
                        m_items = m_builder.getSiteNavigation(m_resource, m_endLevel);
                    }
                    break;
                case breadCrumb:
                    if (m_resource != null) {
                        // resource is set
                        m_items = m_builder.getNavigationBreadCrumb(
                            m_resource,
                            m_startLevel,
                            m_endLevel,
                            Boolean.valueOf(m_param).booleanValue());
                    } else {
                        if (m_startLevel == Integer.MIN_VALUE) {
                            // default start level is zero
                            m_items = m_builder.getNavigationBreadCrumb(0, Boolean.valueOf(m_param).booleanValue());
                        } else {
                            if (m_endLevel != Integer.MIN_VALUE) {
                                m_items = m_builder.getNavigationBreadCrumb(m_startLevel, m_endLevel);
                            } else {
                                m_items = m_builder.getNavigationBreadCrumb(
                                    m_startLevel,
                                    Boolean.valueOf(m_param).booleanValue());
                            }
                        }
                    }
                    break;
                case treeForFolder:
                    if (m_resource == null) {
                        m_items = m_builder.getNavigationTreeForFolder(m_startLevel, m_endLevel);
                    } else {
                        m_items = m_builder.getNavigationTreeForFolder(m_resource, m_startLevel, m_endLevel);
                    }
                    break;
                case forResource:
                default:
                    List<CmsJspNavElement> items = new ArrayList<CmsJspNavElement>(1);
                    if (m_resource == null) {
                        items.add(m_builder.getNavigationForResource());
                    } else {
                        items.add(m_builder.getNavigationForResource(m_resource));
                    }
                    m_items = items;
                    break;
            }
        }
        return m_items;
    }
279973
public void setSAMLProviderList(java.util.Collection<SAMLProviderListEntry> sAMLProviderList) {
        if (sAMLProviderList == null) {
            this.sAMLProviderList = null;
            return;
        }

        this.sAMLProviderList = new com.amazonaws.internal.SdkInternalList<SAMLProviderListEntry>(sAMLProviderList);
    }
366446
public void setParameters(Map<String, String> parameters) {
        if (parameters == null || parameters.isEmpty()) {
            this.parameterItemRuleMap = null;
        } else {
            ItemRuleMap itemRuleMap = new ItemRuleMap();
            for (Map.Entry<String, String> entry : parameters.entrySet()) {
                ItemRule ir = new ItemRule();
                ir.setTokenize(false);
                ir.setName(entry.getKey());
                ir.setValue(entry.getValue());
                itemRuleMap.putItemRule(ir);
            }
            this.parameterItemRuleMap = itemRuleMap;
        }
    }
814638
protected CmsListItem makeListItem(CmsUser user) {

        CmsListItem item = getList().newItem(user.getId().toString());
        setUserData(user, item);
        return item;
    }
58222
public ItemFilter<Model, Item> withFilterPredicate(IItemAdapter.Predicate<Item> filterPredicate) {
        this.mFilterPredicate = filterPredicate;
        return this;
    }
604959
protected static String getSingleParam(List<String> list) {
        if (list != null && list.size() == 1) {
            return list.get(0);
        }
        return null;
    }
1091693
function processRule(node, item, list) {
    var selectors = node.prelude.children;
    var declarations = node.block.children;
    var nodeCompareMarker = selectors.first().compareMarker;
    var skippedCompareMarkers = {};

    list.nextUntil(item.next, function(next, nextItem) {
        // skip non-ruleset node if safe
        if (next.type !== 'Rule') {
            return utils.unsafeToSkipNode.call(selectors, next);
        }

        if (node.pseudoSignature !== next.pseudoSignature) {
            return true;
        }

        var nextFirstSelector = next.prelude.children.head;
        var nextDeclarations = next.block.children;
        var nextCompareMarker = nextFirstSelector.data.compareMarker;

        // if next ruleset has same marked as one of skipped then stop joining
        if (nextCompareMarker in skippedCompareMarkers) {
            return true;
        }

        // try to join by selectors
        if (selectors.head === selectors.tail) {
            if (selectors.first().id === nextFirstSelector.data.id) {
                declarations.appendList(nextDeclarations);
                list.remove(nextItem);
                return;
            }
        }

        // try to join by properties
        if (utils.isEqualDeclarations(declarations, nextDeclarations)) {
            var nextStr = nextFirstSelector.data.id;

            selectors.some(function(data, item) {
                var curStr = data.id;

                if (nextStr < curStr) {
                    selectors.insert(nextFirstSelector, item);
                    return true;
                }

                if (!item.next) {
                    selectors.insert(nextFirstSelector);
                    return true;
                }
            });

            list.remove(nextItem);
            return;
        }

        // go to next ruleset if current one can be skipped (has no equal specificity nor element selector)
        if (nextCompareMarker === nodeCompareMarker) {
            return true;
        }

        skippedCompareMarkers[nextCompareMarker] = true;
    });
}
1018389
public static <O extends Object> ParameterItem<O> create(final String name, final O defaultValue) {
        return create(new ObjectParameter<>(name, defaultValue));
    }
1266662
private void convert(List<JqassistantRules> rules, RuleSource ruleSource, RuleSetBuilder builder) throws RuleException {
        for (JqassistantRules rule : rules) {
            List<SeverityRuleType> severityRuleTypes = rule.getConceptOrConstraintOrGroup();
            for (SeverityRuleType severityRuleType : severityRuleTypes) {
                String id = severityRuleType.getId();
                if (severityRuleType instanceof ConceptType) {
                    Concept concept = createConcept(id, ruleSource, (ConceptType) severityRuleType);
                    builder.addConcept(concept);
                } else if (severityRuleType instanceof ConstraintType) {
                    Constraint constraint = createConstraint(id, ruleSource, (ConstraintType) severityRuleType);
                    builder.addConstraint(constraint);
                } else if (severityRuleType instanceof GroupType) {
                    Group group = createGroup(id, ruleSource, (GroupType) severityRuleType);
                    builder.addGroup(group);
                }
            }
        }
    }
945845
public void addAttributeItemRule(ItemRule itemRule) {
        if (attributeItemRuleMap == null) {
            attributeItemRuleMap = new ItemRuleMap();
        }
        attributeItemRuleMap.putItemRule(itemRule);
    }
1348166
@Nonnull
    private List<MixinMatch> getRules( CssFormatter formatter ) throws LessException {
        if( mixinRules != null && stackID == formatter.stackID() ) {
            return mixinRules;
        }
        List<Rule> rules = formatter.getMixin( name );
        if( rules == null ) {
            rules = mixins.get( name );
        }
        if( rules == null ) {
            int idx = name.indexOf( '>' ); // mixin with namespace?
            if( idx > 0 ) {
                String mainName = name.substring( 0, idx ).trim();
                rules = mixins.get( mainName );
                if( rules != null ) {
                    rules = rules.get( 0 ).getMixin( name.substring( idx + 1 ).trim() );
                }
            } else {
                idx = name.indexOf( '.' ); // mixin with namespace?
                if( idx > 0 ) {
                    String mainName = name.substring( 0, idx ).trim();
                    rules = mixins.get( mainName );
                    if( rules != null ) {
                        rules = rules.get( 0 ).getMixin( name.substring( idx ).trim() );
                    }
                }
            }
            if( rules == null ) {
                throw createException( "Undefined mixin: " + name );
            }
        }
        stackID = formatter.stackID();
        mixinRules = new ArrayList<>();
        boolean paramMatch = false;
        List<Rule> defaultMixins = null;
        for( Rule rule : rules ) {
            MixinMatch matching = rule.match( formatter, paramValues, false );
            if( matching != null ) {
                paramMatch = true;
                if( matching.getGuard() ) {
                    mixinRules.add( matching );
                } else if( matching.wasDefault() ) {
                    if( defaultMixins == null ) {
                        defaultMixins = new ArrayList<>();
                    }
                    defaultMixins.add( rule );
                }
            }
        }
        if( !paramMatch ) {
            throw createException( "No matching definition was found for: " + name );
        }
        if( mixinRules.size() == 0 && defaultMixins != null ) {
            for( Rule rule : defaultMixins ) {
                MixinMatch matching = rule.match( formatter, paramValues, true );
                if( matching != null && matching.getGuard() ) {
                    mixinRules.add( matching );
                }
            }
        }
        return mixinRules;
    }