// newExprIterFromGroup creates the iterator on the Group.
184760
func newExprIterFromGroup(g *Group, p *Pattern) *ExprIter {
	for elem := g.GetFirstElem(p.Operand); elem != nil; elem = elem.Next() {
		expr := elem.Value.(*GroupExpr)
		if !p.Operand.Match(GetOperand(expr.ExprNode)) {
			return nil
		}
		iter := newExprIterFromGroupExpr(expr, p)
		if iter != nil {
			iter.Group, iter.Element = g, elem
			return iter
		}
	}
	return nil
}
553416
func (api *Client) CreateGroup(group string) (*Group, error) {
	return api.CreateGroupContext(context.Background(), group)
}
595571
func NewFromPool(p *sync.Pool) *Container {
	res := new(Container)
	res.pool = p
	return res
}
959184
func NewMSPPeerGroup(mspID string, peerRetriever MSPPeerRetriever) PeerGroup {
	return &mspPeerGroup{
		mspID:         mspID,
		peerRetriever: peerRetriever,
	}
}
935191
func (re *Regexp) GroupNameFromNumber(i int) string {
	if re.capslist == nil {
		if i >= 0 && i < re.capsize {
			return strconv.Itoa(i)
		}

		return ""
	}

	if re.caps != nil {
		var ok bool
		if i, ok = re.caps[i]; !ok {
			return ""
		}
	}

	if i >= 0 && i < len(re.capslist) {
		return re.capslist[i]
	}

	return ""
}
1157429
func NewFromTemplate(r io.Reader) (Generator, error) {
	var config rspec.Spec
	if err := json.NewDecoder(r).Decode(&config); err != nil {
		return Generator{}, err
	}

	envCache := map[string]int{}
	if config.Process != nil {
		envCache = createEnvCacheMap(config.Process.Env)
	}

	return Generator{
		Config: &config,
		envMap: envCache,
	}, nil
}
824439
func (g *Group) Insert(e *GroupExpr) bool {
	if g.Exists(e) {
		return false
	}

	operand := GetOperand(e.ExprNode)
	var newEquiv *list.Element
	mark, hasMark := g.FirstExpr[operand]
	if hasMark {
		newEquiv = g.Equivalents.InsertAfter(e, mark)
	} else {
		newEquiv = g.Equivalents.PushBack(e)
		g.FirstExpr[operand] = newEquiv
	}
	g.Fingerprints[e.FingerPrint()] = newEquiv
	return true
}
922255
func (c *Command) AddGroup(shortDescription string, longDescription string, data interface{}) (*Group, error) {
	group := newGroup(shortDescription, longDescription, data)

	group.parent = c

	if err := group.scanType(c.scanSubcommandHandler(group)); err != nil {
		return nil, err
	}

	c.groups = append(c.groups, group)
	return group, nil
}
81276
func NewGroupAddExternalIdType(Description string) *GroupAddExternalIdType {
	s := new(GroupAddExternalIdType)
	s.Description = Description
	return s
}
335242
func NewGroupExpr(node plannercore.LogicalPlan) *GroupExpr {
	return &GroupExpr{
		ExprNode: node,
		Children: nil,
		Explored: false,
	}
}
20788
func (p *parser) parseFilterExpr(n node) node {
	opnd := p.parsePrimaryExpr(n)
	if p.r.typ == itemLBracket {
		opnd = newFilterNode(opnd, p.parsePredicate(opnd))
	}
	return opnd
}
116344
func NewGroupAddExternalIdDetails(NewValue string) *GroupAddExternalIdDetails {
	s := new(GroupAddExternalIdDetails)
	s.NewValue = NewValue
	return s
}
411679
func GroupFromContext(ctx context.Context) *Group {
	c, _ := ctx.Value(groupKey).(*Group)
	return c
}
743647
func NewGroupingBuilder(g Grouping) *GroupingBuilder {
	if g == nil {
		return new(GroupingBuilder)
	}
	b := GroupingBuilder{groupedTable{
		tables:   make(map[GroupID]*Table),
		groups:   append([]GroupID(nil), g.Tables()...),
		colNames: append([]string(nil), g.Columns()...),
	}, nil}
	for _, gid := range g.Tables() {
		t := g.Table(gid)
		b.g.tables[gid] = t
		if b.colTypes == nil {
			b.colTypes = colTypes(t)
		}
	}
	return &b
}
371050
func (s *VMGroupService) NewListInstanceGroupsParams() *ListInstanceGroupsParams {
	p := &ListInstanceGroupsParams{}
	p.p = make(map[string]interface{})
	return p
}
629519
func NewRegexp() *Regexp {
	return &Regexp{
		factory: &regexpQueryFactory{
			compiled:  make(map[string]regexpQuery),
			threshold: time.Minute,
		},
		flags:     regexpFlagList(defaultFlags),
		quotemeta: false,
		name:      "Regexp",
		outCh:     pipeline.ChanOutput(make(chan interface{})),
	}
}
21649
func NewConsumerGroup(brokers []string, topic string, group string, offset int64) (*ConsumerGroup, error) {
	return newConsumer(brokers, topic, group, offset, false)
}