// And updates the current Path to represent the nodes that match both the
// current Path so far, and the given Path.
973086
func (p *Path) And(path *Path) *Path {
	np := p.clone()
	np.stack = append(np.stack, andMorphism(path))
	return np
}
636948
func andMorphism(p *Path) morphism {
	return morphism{
		Reversal: func(ctx *pathContext) (morphism, *pathContext) { return andMorphism(p), ctx },
		Apply: func(in shape.Shape, ctx *pathContext) (shape.Shape, *pathContext) {
			return join(in, p.Shape()), ctx
		},
	}
}
667437
func And(lhs, rhs *cb.SignaturePolicy) *cb.SignaturePolicy {
	return NOutOf(2, []*cb.SignaturePolicy{lhs, rhs})
}
301398
func (notNull NotNull) And(conds ...Cond) Cond {
	return And(notNull, And(conds...))
}
570712
func (p *pathTree) add(rel string) {
	if !p.caseSensitive {
		rel = strings.ToLower(rel)
	}
	p.leafs.Add(rel)
	parentDirs(rel, func(par string) bool {
		p.nodes.Add(par)
		return true
	})
}
402036
func (c *nodes) Update(node *api.Node) (*api.Node, error) {
	result := &api.Node{}
	err := c.r.Put().Resource(c.resourceName()).Name(node.Name).Body(node).Do().Into(result)
	return result, err
}
613333
func (ns *nodeSet) updateNode(n NodeInfo) {
	_, ok := ns.nodes[n.ID]
	if ok {
		ns.nodes[n.ID] = n
	}
}
408561
func And(left, right map[string][]string) map[string][]string {
	result := map[string][]string{}
	for k, v := range left {
		result[k] = v
	}

	for k, v := range right {
		existing, ok := result[k]
		if ok {
			result[k] = append(existing, v...)
		} else {
			result[k] = v
		}
	}

	return result
}
312661
func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
	s.And = v
	return s
}
1033946
func NewAnd(qs graph.QuadStore, sub ...graph.Iterator) *And {
	it := &And{
		uid:               NextUID(),
		internalIterators: make([]graph.Iterator, 0, 20),
		qs:                qs,
	}
	for _, s := range sub {
		it.AddSubIterator(s)
	}
	return it
}
620820
func (c *Connection) Set(path string, node client.Node) error {
	c.RLock()
	defer c.RUnlock()
	if err := c.isClosed(); err != nil {
		return err
	}
	return c.set(path, node)
}
428042
func (n *node) Update(data interface{}) error {
	return n.update(data, func(ref *reflect.Value, current *reflect.Value, cfg *structConfig) error {
		numfield := ref.NumField()
		for i := 0; i < numfield; i++ {
			f := ref.Field(i)
			if ref.Type().Field(i).PkgPath != "" {
				continue
			}
			zero := reflect.Zero(f.Type()).Interface()
			actual := f.Interface()
			if !reflect.DeepEqual(actual, zero) {
				cf := current.Field(i)
				cf.Set(f)
				idxInfo, ok := cfg.Fields[ref.Type().Field(i).Name]
				if ok {
					idxInfo.Value = &cf
				}
			}
		}
		return nil
	})
}
82771
func (o Opt) And(other Opt) Opt {
	if o == nil {
		if other == nil {
			return nil
		}
		return other
	}
	if other == nil {
		return o
	}
	return Opts{o, other}.Merged()
}
1136068
func (m *Map) CheckAndUpgrade(desired *MapInfo) bool {
	desiredMapType := GetMapType(desired.MapType)
	return objCheck(
		m.fd,
		m.path,
		int(desiredMapType),
		desired.KeySize,
		desired.ValueSize,
		desired.MaxEntries,
		desired.Flags,
	)
}
443328
func (l *Leader) Current(node client.Node) error {
	path, _, err := l.getLowestSequence()
	if err != nil {
		return err
	}
	bytes, stat, err := l.c.Get(path)
	if err != nil {
		return xlateError(err)
	}
	if len(bytes) == 0 {
		return client.ErrEmptyNode
	}
	if err := json.Unmarshal(bytes, node); err != nil {
		return client.ErrSerialization
	}
	node.SetVersion(stat)
	return nil
}
970970
func (xmlNode *XmlNode) Path() (path string) {
	pathPtr := C.xmlGetNodePath(xmlNode.Ptr)
	if pathPtr != nil {
		p := (*C.char)(unsafe.Pointer(pathPtr))
		defer C.xmlFreeChars(p)
		path = C.GoString(p)
	}
	return
}
1314804
func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
	s.And = v
	return s
}